home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / B-C / CW TCL port package.sit / CW TCL port package / *TCL source.diff < prev   
Encoding:
Text File  |  1994-05-26  |  67.1 KB  |  3,120 lines

  1. r(Supplementary Info)
  2. fCApplication AE fns.doc
  3. i
  4. fCClipboard AE fns.doc
  5. i
  6. fCDocument AE fns.doc
  7. i
  8. fCEnvirons.doc
  9. i
  10. fCFileElement.doc
  11. i
  12. fConverting To TCL 2.0.doc
  13. i
  14. fCPICTGridDirector.doc
  15. i
  16. fCSwitchboard AE fns.doc
  17. i
  18. fCWindow AE fns.doc
  19. i
  20. fResource TMPLs.doc
  21. i
  22. fUsing CSaver.doc
  23. i
  24. o
  25. rApple Event Classes
  26. fCAppleEvent.cp
  27. x68074689,520550777
  28. c0,26
  29. a#include <AERegistry.h>                    // •• CW TCL
  30. c27,631
  31. e
  32. fCAppleEvent.h
  33. x275804591,25037120
  34. c0,18
  35. a#include "TCL.h"                        // •• CW TCL
  36. c24,24
  37. c19,109
  38. e
  39. fCAppleEventObject.cpp
  40. x47651295,460537743
  41. c0,1882
  42. a#ifdef TCL_USE_PP_EXCEPTIONS            // •• CW TCL
  43. a    catch_all_()                        // •• CW TCL
  44. a    {                                    // •• CW TCL
  45. a        err = gLastError;                // •• CW TCL
  46. a        msg = gLastMessage;                // •• CW TCL
  47. a    }                                    // •• CW TCL
  48. a#else                                    // •• CW TCL
  49. c1883,1892
  50. a#endif                                    // •• CW TCL
  51. c1893,2346
  52. e
  53. fCAppleEventObject.h
  54. x26395287,278913058
  55. c0,17
  56. a#include "TCL.h"                            // •• CW TCL: removed <>
  57. c19,19
  58. a#ifndef __AEOBJECTS__                        // •• CW TCL
  59. a#include <AEObjects.h>                        // •• CW TCL
  60. a#endif                                        // •• CW TCL
  61. c19,38
  62. a    TCL_DECLARE_CLASS;
  63. c40,231
  64. e
  65. fCAppleEventSender.cpp
  66. x261427134,225092234
  67. c0,13
  68. a#include "Exceptions.h"                        // •• CW TCL: removed <>
  69. c15,17
  70. a#include "CSwitchboard.h"                    // •• CW TCL: removed <>
  71. a#include "CWatchDesc.h"                        // •• CW TCL: removed <>
  72. a#include "Global.h"                            // •• CW TCL: added missing header
  73. c20,291
  74. e
  75. fCAppleEventSender.h
  76. i
  77. fCFileElement.cpp
  78. x14551318,178064652
  79. c0,25
  80. a#include "TCLpstring.h"                        // •• CW TCL
  81. c26,230
  82. e
  83. fCFileElement.h
  84. x2124713,389083163
  85. c0,21
  86. a//#ifdef BR_USE_NEW_HELPER                        // •• CW TCL
  87. a//class CFileElement TCL_AUTO_DESTRUCT_OBJECT , public CAppleEventObject
  88. a//#else                                            // •• CW TCL
  89. aclass CFileElement : public CAppleEventObject
  90. a//#endif                                        // •• CW TCL
  91. c23,55
  92. e
  93. fCProperty.cpp
  94. x448828269,50593216
  95. c0,13
  96. a#ifdef __MWERKS__                        // •• CW TCL
  97. a#include <AERegistry.h>                    // •• CW TCL
  98. a#endif                                    // •• CW TCL
  99. c15,15
  100. c14,150
  101. e
  102. fCProperty.h
  103. x249114375,359604295
  104. c0,18
  105. a//#ifdef BR_USE_NEW_HELPER                        // •• CW TCL
  106. a//class CProperty TCL_AUTO_DESTRUCT_OBJECT , public CAppleEventObject
  107. a//#else                                            // •• CW TCL
  108. aclass CProperty : public CAppleEventObject        // •• CW TCL
  109. a//#endif                                        // •• CW TCL
  110. c20,47
  111. e
  112. fCWatchDesc.cpp
  113. x37982565,20094356
  114. c0,14
  115. a#ifdef __MWERKS__                    // •• CW TCL
  116. a#include "Global.h"                    // •• CW TCL
  117. a#endif                                // •• CW TCL
  118. c20,20
  119. c15,37
  120. e
  121. fCWatchDesc.h
  122. i
  123. o
  124. rBedrock Exception Library
  125. fBEL #includes.cpp
  126. i
  127. rBRCommon
  128. fBRCommon.h
  129. i
  130. fBRMacWin.h
  131. i
  132. fBRMath.h
  133. i
  134. fBRPriMem.h
  135. i
  136. fBRPriStr.h
  137. i
  138. fBRStdDef.h
  139. i
  140. o
  141. rBRDebug
  142. fBRDbgStr.h
  143. i
  144. fBRPriDeb.h.bed
  145. i
  146. o
  147. rBRExcLib
  148. rHeaders
  149. fBRAutoDe.h
  150. x58937606,344811093
  151. c0,19
  152. a// #define BR_USE_NEW_HELPER                // •• CW TCL: use the setting in precompiled headers
  153. c21,92
  154. a#ifdef BR_USE_NEW_HELPER                // •• CW TCL
  155. c93,96
  156. a#endif                                    // •• CW TCL
  157. c97,99
  158. e
  159. fBRBedExc.h
  160. i
  161. fBRBreakC.h
  162. i
  163. fBRDelSta.h
  164. i
  165. fBRExcDef.h
  166. x533666636,294218477
  167. c0,82
  168. a#ifndef __MWERKS__                            // •• CW TCL
  169. c83,84
  170. a        new(_BR_CBedNewHelper(::operator new(), ::operator delete())) class##args, \
  171. c86,87
  172. a#else // #ifndef __MWERKS__                    // •• CW TCL
  173. c77,78
  174. a        new(new _BR_CBedNewHelper(::operator new, ::operator delete)) class##args, \
  175. c86,87
  176. a#endif // #ifndef __MWERKS__                // •• CW TCL
  177. c91,91
  178. c102,102
  179. c90,296
  180. e
  181. fBRExcept.h
  182. i
  183. fBRExcLib.h
  184. i
  185. fBRExcLog.h
  186. i
  187. fBRExcRun.h
  188. i
  189. fBRExcTas.h
  190. i
  191. fBRNewHel.h
  192. i
  193. fBROnStac.h
  194. x309072200,179823336
  195. c0,15
  196. a#ifdef TCL_POWER_PC                        // •• CW TCL
  197. a    int _BR_BedIsOnStack(void *);        // •• CW TCL
  198. a#else                                    // •• CW TCL
  199. c16,17
  200. c39,39
  201. a#ifdef __MWERKS__                        // •• CW TCL
  202. c39,39
  203. aextern "C" {
  204. c39,39
  205. a    #if USES68KINLINES
  206. a    #pragma parameter __D0 _BR_BedIsOnStack(__A0)
  207. a    #endif
  208. c21,21
  209. a        NINEWORDINLINE(0x7000, 0xBFC8, 0x6408, 0xB1F8, 0x0908, 0x6202, 0x7001, 0x4880, 0x48C0);
  210. a    
  211. c23,23
  212. c39,39
  213. a#else // #ifdef __MWERKS__                // •• CW TCL
  214. c39,39
  215. c42,44
  216. c21,23
  217. c39,39
  218. a#endif // #ifdef __MWERKS__                // •• CW TCL
  219. c48,48
  220. c25,90
  221. a#endif // ## ifdef TCL_POWER_PC            // •• CW TCL
  222. c106,106
  223. c103,103
  224. c106,106
  225. c93,154
  226. e
  227. fBRPostEx.h
  228. i
  229. fBRPriDeb.h
  230. x242883629,259231245
  231. c0,107
  232. a#ifndef TCL_NO_DEBUGGER_CALLS                        // •• CW TCL
  233. c108,108
  234. a#else                                                // •• CW TCL
  235. a#define BR_PRIMITIVE_DEBUGGER_BREAK() ((void)0)        // •• CW TCL
  236. a#endif                                                // •• CW TCL
  237. c109,178
  238. e
  239. fBRSExcep.h
  240. i
  241. fBRSExcLo.h
  242. i
  243. fBRSPostE.h
  244. i
  245. fBRTryBlo.h
  246. i
  247. o
  248. o
  249. rBRRunTyp
  250. fBRClaInf.h
  251. x477857840,519359822
  252. c0,23
  253. a#ifndef TCL_NO_MULTIPLE_STATIC_INHERITANCE        // •• CW TCL: this macro is irrelevant in
  254. a//                                                //        the DR/3 port, we want any reference
  255. a//                                                //        to it to cause a compilation error
  256. c24,26
  257. a#endif // TCL_NO_MULTIPLE_STATIC_INHERITANCE
  258. c27,173
  259. a#ifndef TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  260. c174,180
  261. a#else // TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  262. c175,175
  263. c179,179
  264. a#endif // TCL_NO_MULTIPLE_STATIC_INHERITANCE            // •• CW TCL
  265. c184,184
  266. a#ifndef TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  267. c182,183
  268. a#else // TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  269. c182,182
  270. a    _##name##_gAncestors
  271. a#endif // TCL_NO_MULTIPLE_STATIC_INHERITANCE            // •• CW TCL
  272. c196,196
  273. c196,196
  274. a#ifndef TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  275. c245,245
  276. c190,191
  277. c188,195
  278. a#else // TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  279. c186,186
  280. a        BR_CClassInfo BR_SHARED_DATA \
  281. a            _##name##_gClassInfo(#name, sizeof(name), _##name##_gAncestors); \
  282. a        BR_CClassInfo& name::BedStaticGetClassInfo() { return _##name##_gClassInfo; } \
  283. a        BR_ClassReference* name::BedGetAncestors() { return _##name##_gAncestors; }
  284. a#endif // TCL_NO_MULTIPLE_STATIC_INHERITANCE            // •• CW TCL
  285. c202,202
  286. a#ifndef TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  287. c197,235
  288. a#else // TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  289. c197,197
  290. a    BR_ClassReference BR_SHARED_DATA _BR_CLASS_ANCESTORS(name)[] = \
  291. c199,203
  292. a    extern BR_CClassInfo _##ancestor##_gClassInfo; \
  293. a    BR_ClassReference BR_SHARED_DATA _BR_CLASS_ANCESTORS(name)[] = \
  294. c199,199
  295. a        &_##ancestor##_gClassInfo, \
  296. c200,202
  297. c210,210
  298. a    extern BR_CClassInfo _##ancestor1##_gClassInfo; \
  299. a    extern BR_CClassInfo _##ancestor2##_gClassInfo; \
  300. a    BR_ClassReference BR_SHARED_DATA _BR_CLASS_ANCESTORS(name)[] = \
  301. c199,199
  302. a        &_##ancestor1##_gClassInfo, \
  303. a        &_##ancestor2##_gClassInfo, \
  304. c200,202
  305. c218,218
  306. a    extern BR_CClassInfo _##ancestor1##_gClassInfo; \
  307. a    extern BR_CClassInfo _##ancestor2##_gClassInfo; \
  308. a    extern BR_CClassInfo _##ancestor3##_gClassInfo; \
  309. a    BR_ClassReference BR_SHARED_DATA _BR_CLASS_ANCESTORS(name)[] = \
  310. c199,199
  311. a        &_##ancestor1##_gClassInfo, \
  312. a        &_##ancestor2##_gClassInfo, \
  313. a        &_##ancestor3##_gClassInfo, \
  314. c200,202
  315. c227,227
  316. a    extern BR_CClassInfo _##ancestor1##_gClassInfo; \
  317. a    extern BR_CClassInfo _##ancestor2##_gClassInfo; \
  318. a    extern BR_CClassInfo _##ancestor3##_gClassInfo; \
  319. a    extern BR_CClassInfo _##ancestor4##_gClassInfo; \
  320. a    BR_ClassReference BR_SHARED_DATA _BR_CLASS_ANCESTORS(name)[] = \
  321. c199,199
  322. a        &_##ancestor1##_gClassInfo, \
  323. a        &_##ancestor2##_gClassInfo, \
  324. a        &_##ancestor3##_gClassInfo, \
  325. a        &_##ancestor4##_gClassInfo, \
  326. c200,201
  327. a#endif // TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  328. c265,265
  329. c237,244
  330. a#ifndef TCL_NO_MULTIPLE_STATIC_INHERITANCE        // •• CW TCL
  331. c174,174
  332. c246,259
  333. a#else // TCL_NO_MULTIPLE_STATIC_INHERITANCE        // •• CW TCL
  334. c246,247
  335. a        static BR_CClassInfo& BedStaticGetClassInfo(); \
  336. a        static BR_ClassReference* BedGetAncestors();
  337. a#endif // TCL_NO_MULTIPLE_STATIC_INHERITANCE    // •• CW TCL
  338. c291,291
  339. c261,332
  340. e
  341. fBRClaInf.h.bed
  342. i
  343. fBRClaInf.h.tcl
  344. i
  345. fBRRunTyp.h
  346. i
  347. o
  348. rBRTaskG
  349. fBRBedTas.h
  350. i
  351. fBRTaskG.h
  352. i
  353. o
  354. rSource
  355. fBRAutoDe.cpp
  356. x201066891,424115557
  357. c0,24
  358. a#ifndef __MWERKS__                        // •• CW TCL
  359. c25,25
  360. a#endif                                    // •• CW TCL
  361. c26,147
  362. e
  363. fBRBedExc.cpp
  364. x278777037,501825703
  365. c0,16
  366. a#ifndef __MWERKS__                        // •• CW TCL
  367. c17,17
  368. a#endif                                    // •• CW TCL
  369. c18,75
  370. e
  371. fBrBedTas.cpp
  372. x338887648,96927452
  373. c0,115
  374. a#ifndef TCL_NO_DEBUGGER_CALLS                // •• CW TCL
  375. c116,116
  376. a#endif                                        // •• CW TCL
  377. c117,124
  378. e
  379. fBRBreakC.cpp
  380. x328512583,237548315
  381. c0,20
  382. a#ifndef __MWERKS__                            // •• CW TCL
  383. c21,21
  384. a#endif                                        // •• CW TCL
  385. c22,49
  386. e
  387. fBRClaInf.cpp
  388. x531482884,227434933
  389. c0,92
  390. a        
  391. a        if (ancestors == 0)                        // •• CW TCL: sometimes ancestors isn't filled in
  392. a            return FALSE;                        // •• CW TCL
  393. c93,136
  394. e
  395. fBRDelSta.cpp
  396. x523569304,209703026
  397. c0,40
  398. a#ifndef __MWERKS__                        // •• CW TCL
  399. c41,41
  400. a#endif                                    // •• CW TCL
  401. c42,420
  402. e
  403. fBRExcept.cpp
  404. x228670602,340246248
  405. c0,22
  406. a#ifndef __MWERKS__                    // •• CW TCL
  407. c23,23
  408. a#endif                                // •• CW TCL
  409. c24,91
  410. e
  411. fBRExcLog.cpp
  412. x311909883,534914517
  413. c0,32
  414. a#ifndef __MWERKS__                        // •• CW TCL
  415. c33,33
  416. a#endif                                    // •• CW TCL
  417. c34,148
  418. e
  419. fBRExcRun.cpp
  420. x92290269,382587829
  421. c0,38
  422. a#ifndef __MWERKS__                    // •• CW TCL
  423. c39,39
  424. a#endif                                // •• CW TCL
  425. c40,368
  426. a#ifndef __MWERKS__                            // •• CW TCL
  427. c369,370
  428. a#endif // #ifndef __MWERKS__                // •• CW TCL
  429. c371,395
  430. e
  431. fBRExcTas.cpp
  432. x170324314,393372980
  433. c0,40
  434. a#ifndef __MWERKS__                        // •• CW TCL
  435. c41,41
  436. a#endif                                    // •• CW TCL
  437. c42,63
  438. e
  439. fBRNewHel.cpp
  440. x294702045,517745207
  441. c0,20
  442. a#ifndef __MWERKS__                        // •• CW TCL
  443. c21,21
  444. a#endif                                    // •• CW TCL
  445. c22,368
  446. e
  447. fBRPostEx.cpp
  448. x80288765,191908443
  449. c0,24
  450. a#ifndef __MWERKS__                    // •• CW TCL
  451. c25,25
  452. a#endif                                // •• CW TCL
  453. c26,70
  454. e
  455. fBRPriMem.cpp
  456. i
  457. fBRPriStr.cpp
  458. i
  459. fBRTryBlo.cpp
  460. x276351068,499546392
  461. c0,20
  462. a#ifndef __MWERKS__                    // •• CW TCL
  463. c21,21
  464. a#endif                                // •• CW TCL
  465. c22,27
  466. a#ifndef __MWERKS__                    // •• CW TCL
  467. c28,28
  468. a#endif                                // •• CW TCL
  469. c29,92
  470. e
  471. o
  472. o
  473. rControl Classes
  474. fCArrowPopupPane.cp
  475. x384469485,386499559
  476. c0,110
  477. a    border = new CPaneBorder;
  478. c112,151
  479. e
  480. fCArrowPopupPane.h
  481. i
  482. fCButton.cp
  483. x484881015,419802221
  484. c0,293
  485. a        border = new CPaneBorder;
  486. c295,361
  487. e
  488. fCButton.h
  489. i
  490. fCCheckBox.cp
  491. i
  492. fCCheckBox.h
  493. i
  494. fCGroupButton.cpp
  495. x378000304,343277996
  496. c0,58
  497. a        if (member(anEnclosure, CGroupButtonEnclosure)) {            // •• CW TCL: fix casting bug
  498. a            CWindow* w = (CWindow*) anEnclosure;                    // •• CW TCL
  499. a            itsGroupEnclosure = (CGroupButtonEnclosure*) w;            // •• CW TCL
  500. a        }                                                            // •• CW TCL
  501. a            
  502. a//        CWindow        *w = (CWindow*) anEnclosure;
  503. a//        itsGroupEnclosure = TCL_DYNAMIC_CAST(CGroupButtonEnclosure, w);
  504. c61,161
  505. e
  506. fCGroupButton.h
  507. x432023668,318155356
  508. c0,1
  509. a#include "TCL.h"                    // •• CW TCL
  510. c2,10
  511. a    TCL_DECLARE_CLASS;
  512. c12,42
  513. e
  514. fCGroupButtonEnclosure.cpp
  515. i
  516. fCGroupButtonEnclosure.h
  517. x180100340,176765250
  518. c0,14
  519. a#ifndef TCL_NO_TEMPLATES                            // •• CW TCL
  520. c15,15
  521. a#else                                                // •• CW TCL
  522. aCW_Decl_PtrArray(CGroupButton)                        // •• CW TCL
  523. atypedef CPtrArray_CGroupButton CGroupButtonList;    // •• CW TCL
  524. a#endif                                                // •• CW TCL
  525. c16,19
  526. a    TCL_DECLARE_CLASS;
  527. c21,31
  528. e
  529. fCIconPane.cp
  530. i
  531. fCIconPane.h
  532. i
  533. fCPopupMenu.cp
  534. i
  535. fCPopupMenu.h
  536. i
  537. fCPopupPane.cp
  538. x340563975,12250139
  539. c0,37
  540. aTCL_DEFINE_CLASS_M1(CPopupPane, CPane);            // •• CW TCL: sometimes need dynamic refs
  541. c39,369
  542. e
  543. fCPopupPane.h
  544. i
  545. fCRadioControl.cp
  546. i
  547. fCRadioControl.h
  548. i
  549. fCRadioGroupPane.cp
  550. i
  551. fCRadioGroupPane.h
  552. i
  553. fCStdPopupPane.cp
  554. i
  555. fCStdPopupPane.h
  556. i
  557. o
  558. rCore Classes
  559. rCore Headers
  560. fCApplication.h
  561. x136048323,115357488
  562. c0,42
  563. a#ifndef TCL_NO_TEMPLATES                    // •• CW TCL
  564. c43,43
  565. a#else                                        // •• CW TCL
  566. a#include "CPtrArray.h"                        // •• CW TCL
  567. aCW_Decl_PtrArray(CChore)                    // •• CW TCL
  568. atypedef CPtrArray_CChore CChoreList;        // •• CW TCL
  569. a#endif                                        // •• CW TCL
  570. c44,44
  571. c48,48
  572. c45,239
  573. a#ifndef TCL_NO_PATCHES                        // •• CW TCL
  574. c244,244
  575. c241,246
  576. a#endif // #ifndef TCL_NO_PATCHES            // •• CW TCL
  577. e
  578. fCArray.h
  579. i
  580. fCArrayIterator.h
  581. i
  582. fCBartender.h
  583. i
  584. fCBureaucrat.h
  585. i
  586. fCChore.h
  587. i
  588. fCClipboard.h
  589. i
  590. fCCollaborator.h
  591. x32480683,293416270
  592. c0,13
  593. a#ifdef TCL_NO_TEMPLATES                    // •• CW TCL
  594. a#define CCollaboratorList CPtrArray_CCollaborator
  595. a#endif                                    // •• CW TCL
  596. c15,15
  597. c14,15
  598. a#ifdef TCL_NO_TEMPLATES                    // •• CW TCL
  599. aclass CCollaborator;                    // •• CW TCL
  600. aCW_Decl_StreamCalls(CCollaborator)        // •• CW TCL
  601. a#endif                                    // •• CW TCL
  602. c18,18
  603. c16,26
  604. c31,31
  605. c27,69
  606. e
  607. fCCollection.h
  608. x64858342,399984727
  609. c0,25
  610. a#ifdef __MWERKS__                        // •• CW TCL
  611. a    CCollection(CCollection& source);
  612. a#endif                                    // •• CW TCL
  613. c28,28
  614. c26,26
  615. c28,28
  616. c27,34
  617. e
  618. fCControl.h
  619. i
  620. fCDecorator.h
  621. i
  622. fCDesktop.h
  623. x382519935,117831317
  624. c0,16
  625. a#ifndef TCL_NO_TEMPLATES                    // •• CW TCL
  626. c17,17
  627. a#else                                        // •• CW TCL
  628. aCW_Decl_List(CWindow)                        // •• CW TCL
  629. atypedef CList_CWindow CWindowList;            // •• CW TCL
  630. a#endif                                        // •• CW TCL
  631. c18,84
  632. e
  633. fCDirector.h
  634. i
  635. fCDirectorOwner.h
  636. x230669666,423452236
  637. c0,21
  638. a#ifndef TCL_NO_TEMPLATES                    // •• CW TCL
  639. c22,22
  640. a#else                                        // •• CW TCL
  641. aCW_Decl_PtrArray(CDirector)                    // •• CW TCL
  642. atypedef CPtrArray_CDirector CDirectorList;    // •• CW TCL
  643. a#endif                                        // •• CW TCL
  644. c23,49
  645. e
  646. fCDocument.h
  647. x114239706,176709528
  648. c0,19
  649. a#define TCL_NO_TEMPLATES
  650. c22,22
  651. c20,141
  652. e
  653. fCEnvironment.h
  654. i
  655. fCEnvirons.h
  656. x199372584,439316469
  657. c0,15
  658. a#ifdef TCL_NO_TEMPLATES                    // •• CW TCL
  659. aclass CEnvirons;                        // •• CW TCL
  660. aCW_Decl_StreamCalls(CEnvirons)            // •• CW TCL
  661. a#endif                                    // •• CW TCL
  662. c18,18
  663. c16,61
  664. e
  665. fCError.h
  666. i
  667. fCFile.h
  668. i
  669. fCMBarChore.h
  670. i
  671. fCMouseTask.h
  672. i
  673. fCommands.h
  674. i
  675. fConstants.h
  676. i
  677. fCPane.h
  678. i
  679. fCPaneBorder.h
  680. x521993175,370672830
  681. c0,35
  682. a#ifdef TCL_NO_TEMPLATES                    // •• CW TCL
  683. aclass CPaneBorder;                        // •• CW TCL
  684. aCW_Decl_StreamCalls(CPaneBorder)        // •• CW TCL
  685. a#endif                                    // •• CW TCL
  686. c39,39
  687. c36,115
  688. e
  689. fCPanorama.h
  690. i
  691. fCPicture.h
  692. i
  693. fCPrinter.h
  694. i
  695. fCRunArray.h
  696. i
  697. fCScrollBar.h
  698. i
  699. fCScrollPane.h
  700. i
  701. fCSizeBox.h
  702. i
  703. fCSwitchboard.h
  704. i
  705. fCTask.h
  706. i
  707. fCView.h
  708. x99354561,283448835
  709. c0,46
  710. a#ifndef TCL_NO_TEMPLATES                // •• CW TCL
  711. c47,47
  712. a#else                                    // •• CW TCL
  713. aCW_Decl_List(CView)                        // •• CW TCL
  714. atypedef CList_CView CViewList;            // •• CW TCL
  715. a#endif                                    // •• CW TCL
  716. c48,170
  717. e
  718. fCVoidPtrArray.h
  719. i
  720. fCVoidPtrArrayIterator.h
  721. i
  722. fCWindow.h
  723. i
  724. fGlobal.h
  725. i
  726. z802,CException.h
  727. /******************************************************************************
  728.  CException.h
  729.  
  730.         Exception class for exceptions thrown by the TCL
  731.  
  732.     Copyright © 1994 Symantec Corporation. All rights reserved.
  733.  
  734.  ******************************************************************************/
  735.  
  736. #pragma once
  737.  
  738. #ifndef TCL_USE_PP_EXCEPTIONS                // •• CW TCL
  739. #ifndef BREXCEPT_H
  740. #include "BRExcept.h"
  741. #endif
  742. #include "TCLClassInfo.h"
  743.  
  744. class CException TCL_EXCEPTION_CLASS
  745. {
  746. public:
  747.  
  748.     TCL_DECLARE_CLASS
  749.  
  750.     CException(short err, long msg) { SetErr(err); SetMsg(msg); }
  751.  
  752.     short GetErr() { return err; }
  753.     long GetMsg() { return msg; }
  754.  
  755.     void SetErr(short err) { this->err = err; }
  756.     void SetMsg(long msg) { this->msg = msg; }
  757.  
  758. private:
  759.     short    err;
  760.     long    msg;
  761. };
  762.  
  763. #endif // #ifndef TCL_USE_PP_EXCEPTIONS        // •• CW TCL
  764. z6611,Exceptions_PP.h
  765. // ______________________________________________________________________
  766. //
  767. //  Exceptions_PP.h
  768. //  TCL 2.0 CodeWarrior port
  769. //
  770. //
  771.  
  772. #pragma once
  773.  
  774.  
  775. // ______________________________________________________________________
  776. //
  777. //    This file stands in the place of the TCL’s Exceptions.h file.
  778. //    It provides a wrapper for PowerPlant’s exception handling routines
  779. //    within the TCL. Most of the TCL macros are implemented; a few
  780. //    that cannot be duplicated are defined to cause compile-time errors.
  781. //
  782. //    Limitations:
  783. //
  784. //      *    You may not use the typed exception handling which was added
  785. //        in TCL 2.0. The macros catch_, catch_reference_, and
  786. //        catch_no_instance_ are not permitted. You must use
  787. //        catch_all_ instead.
  788. //
  789. //      *    You may not reference the global variables gAskFailure,
  790. //        gBreakFailure, _gTCLBreakCatch, _gTCLBreakFailure, or
  791. //        _gTCLBreakAssert. These variables do not exist in this
  792. //        implementation. The macros which access these variables are
  793. //        implemented.
  794. //
  795. //      *    The PowerPlant header <UException.h> must be installed
  796. //        in the CodeWarrior compiler folder. The file <UException.cp>
  797. //        must be added to the project.
  798. //
  799. //      *    If the __TCL_DEBUG__ macro is defined, the PowerPlant header
  800. //        <UDebugging.h> must also be installed in the CodeWarrior
  801. //        compiler folder. The file <UDebugging.cp> must be added
  802. //        to the project.
  803. //
  804. //      *    Your source may not use the throw_(exception) macro. Error
  805. //        reporting must take place through the standard Fail___ routines.
  806. //        The throw_same_() macro is permitted.
  807. //
  808. //
  809. //    Usage notes:
  810. //
  811. //      *    If the __TCL_DEBUG__ macro is defined, the PowerPlant macro
  812. //        Debug_Throw is also defined. This enables the source-level
  813. //        exception debugging mechanism built into the PowerPlant
  814. //        library.
  815. //
  816. //      *    There are two options for handling assertions: You may use
  817. //        the TCL-style assertion-failed dialog, or you may use the
  818. //        PowerPlant-style debugger break. PowerPlant handling is the
  819. //        default. To enable the TCL handling, comment out the macro
  820. //        TCL_SOURCE_ASSERT below.
  821. // 
  822.  
  823. #define TCL_SOURCE_ASSERT
  824.  
  825.  
  826. // ______________________________________________________________________
  827. //
  828. // bring in the PowerPlant exception library (and a few other definitions)
  829. //
  830.  
  831. #ifdef __TCL_DEBUG__
  832. #define Debug_Throw
  833. #define Debug_Signal
  834. #endif
  835.  
  836. #include <UException.h>
  837.  
  838. #include <Types.h>
  839. #include <AppleEvents.h>
  840.  
  841.  
  842. // ______________________________________________________________________
  843. //
  844. // TCL global error variables
  845. //
  846.  
  847. extern short    gLastError;                // last error code that caused failure
  848. extern long        gLastMessage;            // last message code associated with failure
  849.  
  850. #define kSilentErr    1                // pass to Failure to fail without any user alert
  851.  
  852.  
  853. // ______________________________________________________________________
  854. //
  855. // TCL failure routines
  856. //
  857.  
  858. pascal void Failure(short error, long message);
  859. pascal void Fail(short error);
  860. pascal void FailEvent();
  861. pascal void FailEventMsg(long message);
  862.  
  863. pascal void FailMemError();
  864. pascal void FailResError();
  865. pascal void FailNIL(void *p);
  866. pascal void FailOSErr( short error);
  867. pascal void FailNILRes(void* p);
  868.  
  869. pascal void    Success();
  870.  
  871. pascal long SpecifyMsg(short strListID, short strIndex);
  872. pascal void SetFailInfo(short newError, long newMessage);
  873.  
  874.  
  875. // ______________________________________________________________________
  876. //
  877. // exception debugging macros
  878. //
  879.  
  880. #ifdef Debug_Signal
  881.  
  882. #define _TCL_DEBUG_CATCH \
  883.     SignalPStr_("\pEntering catch block")
  884. #define TCL_BREAK_ON_CATCH(bool) \
  885.     (gDebugSignal = (bool ? debugAction_SourceDebugger : debugAction_Nothing))
  886. #define TCL_ASK_ON_FAIL(bool) \
  887.     (gDebugSignal = (bool ? debugAction_SourceDebugger : debugAction_Nothing))
  888. #define TCL_BREAK_ON_ASSERT(bool) \
  889.     (gDebugSignal = (bool ? debugAction_SourceDebugger : debugAction_Nothing))
  890.  
  891. #else
  892.  
  893. #define _TCL_DEBUG_CATCH ((void) 0)
  894. #define TCL_BREAK_ON_CATCH(bool) ((void) 0)
  895. #define TCL_ASK_ON_FAIL(bool) ((void) 0)
  896. #define TCL_BREAK_ON_ASSERT(bool) ((void) 0)
  897.  
  898. #endif
  899.  
  900.  
  901. #ifdef Debug_Throw
  902.  
  903. #define TCL_BREAK_ON_FAILURE(bool) \
  904.     (gDebugThrow = (bool ? debugAction_SourceDebugger : debugAction_Nothing))
  905.  
  906. #else
  907.  
  908. #define TCL_BREAK_ON_FAILURE(bool) ((void) 0)
  909.  
  910. #endif
  911.  
  912.  
  913. // ______________________________________________________________________
  914. //
  915. // exception handling macros
  916. //
  917.  
  918. #define TRY Try_
  919.  
  920. #define CATCH \
  921.     Catch_(_PP_Err) \
  922.     char __TCL_propagate = 1;
  923.  
  924. #define ENDTRY \
  925.     if (__TCL_propagate) \
  926.         Throw_('same'); \
  927.     EndCatch_
  928.  
  929. #define NO_PROPAGATE \
  930.     __TCL_propagate = 0
  931.  
  932.  
  933. #define try_ Try_
  934.  
  935. #define catch_(class, error) ***Error
  936. #define catch_reference_(class, error) ***Error
  937. #define catch_no_instance_(class, error) ***Error
  938.  
  939. #define catch_all_() \
  940.     Catch_(_PP_Err)
  941.  
  942. #define end_try_ EndCatch_
  943.  
  944. #define throw_(exception) ***Error
  945.  
  946. #define throw_same_() \
  947.     Throw_('same')                    // why not?
  948.  
  949. #define TCL_EXCEPTION_CLASS ***Error
  950.  
  951. #define TCL_NEW(class, init) new class##init
  952.  
  953. #define TCL_END_CONSTRUCTOR
  954.  
  955. #define TCL_START_DESTRUCTOR
  956.  
  957. #define TCL_AUTO_DESTRUCT_OBJECT
  958.  
  959.  
  960. // ______________________________________________________________________
  961. //
  962. // Failure() message strings defined by the TCL
  963. //
  964.  
  965. enum {
  966.     excMsgNullObject = 1,
  967.     excMsgLookupFailed,
  968.     excNewByNameFailed,
  969.     excPrintJobTooBig,
  970.     excExceedTELimit,
  971.  
  972.     excAEStrTooBig,
  973.     excAEUserCanceled,
  974.     excUnknownException,
  975.     excBadFileType,
  976.  
  977.     excLastTCLException = excBadFileType
  978. };
  979.  
  980.  
  981. // ______________________________________________________________________
  982. //
  983. // Assertion macros
  984. //
  985.  
  986. #ifdef __TCL_DEBUG__
  987.  
  988. short _TCL_assertion_failed(char *conditionStr,  char *fileName, int lineNum);
  989. void _TCL_CheckHandle(const Handle);
  990. void _TCL_CheckResource(const Handle);
  991. void _TCL_CheckPtr(const Ptr);
  992. void _TCL_CheckObjectPtr(const void *);
  993. void _TCL_CheckDesc(const AEDesc*);
  994.  
  995. #ifdef TCL_SOURCE_ASSERT
  996.     #define TCL_ASSERT(condition) Assert_(condition)
  997. #else
  998.     #define TCL_ASSERT(condition) \
  999.         ((void) ((condition)) || (_TCL_assertion_failed(#condition, __FILE__, __LINE__),1))
  1000. #endif // #ifdef TCL_SOURCE_ASSERT
  1001.  
  1002. #define TCL_ASSERT_HANDLE(H)         _TCL_CheckHandle((Handle) H)
  1003. #define TCL_ASSERT_RESOURCE(H)        _TCL_CheckResource((Handle) H)
  1004. #define TCL_ASSERT_PTR(P)            _TCL_CheckPtr((Ptr) P)
  1005. #define TCL_ASSERT_OBJECT_PTR(P)    _TCL_CheckObjectPtr(P)
  1006. #define TCL_ASSERT_DESC(P)            _TCL_CheckDesc(P)
  1007.  
  1008. #else // #ifdef __TCL_DEBUG__
  1009.  
  1010. #define TCL_ASSERT(condition)        ((void)0)
  1011. #define TCL_ASSERT_HANDLE(H)        ((void)0)
  1012. #define TCL_ASSERT_RESOURCE(H)        ((void)0)
  1013. #define TCL_ASSERT_PTR(P)            ((void)0)
  1014. #define TCL_ASSERT_OBJECT_PTR(P)    ((void)0)
  1015. #define TCL_ASSERT_DESC(P)            ((void)0)
  1016.  
  1017. #endif // #ifdef __TCL_DEBUG__
  1018.  
  1019.  
  1020. #undef ASSERT
  1021.  
  1022. #define ASSERT(condition) TCL_ASSERT(condition)
  1023. o
  1024. rCore Sources
  1025. fCApplication.asm
  1026. x339079643,107672196
  1027. c0,18
  1028. a#ifndef __MWERKS__                                // •• CW TCL
  1029. c22,22
  1030. c19,30
  1031. a#endif // #ifndef __MWERKS__                    // •• CW TCL
  1032. c33,33
  1033. c31,36
  1034. aextern "C" {
  1035. c42,42
  1036. c39,45
  1037. a#ifdef __MWERKS__                            // •• CW TCL
  1038. aasm
  1039. a#endif                                        // •• CW TCL
  1040. c47,48
  1041. a#ifndef __MWERKS__                            // •• CW TCL
  1042. c49,50
  1043. a#endif                                        // •• CW TCL
  1044. a             clr.l        -(sp)                // reserve some space
  1045. a            movem.l        a0-a5/d0-d7, -(sp)    // save the regs
  1046. a             move.w      64(sp), d7          // get seg#
  1047. c54,57
  1048. a             move.b      #kAllocCanFail, -(sp) // this allocation
  1049. a             jsr            SetAllocation        // can fail
  1050. a             move.b      d0, d6                // save old canFail flag
  1051. c61,62
  1052. a             clr.l        -(sp)                // do a GetResource on
  1053. a             move.l      #'CODE', -(sp)      // the code segment
  1054. c65,65
  1055. a             _GetResource
  1056. a             movea.l       (sp)+, a3            // save the handle
  1057. c62,62
  1058. a             move.b      d6, -(sp)            // restore old allocation
  1059. c70,73
  1060. a             jsr            FailNIL                // returns if OK
  1061. c68,68
  1062. a             move.l        origLoadSeg, 56(sp) // store original LoadSeg on stack
  1063. a             movem.l        (sp)+, a0-a5/d0-d7  // restore regs
  1064. a             rts                                // return to original LoadSeg
  1065. a#ifndef __MWERKS__                            // •• CW TCL
  1066. c79,79
  1067. c21,21
  1068. c80,82
  1069. e
  1070. fCApplication.cp
  1071. x5569548,405443968
  1072. c0,56
  1073. a//#include "CPtrArrayIterator.h"            // •• CW TCL: not actually used here
  1074. c58,59
  1075. a#include "TCLpstring.h"                        // •• CW TCL: is actually used here
  1076. c60,92
  1077. a#ifndef __MWERKS__                        // •• CW TCL: not needed
  1078. c93,93
  1079. a#endif // ## ifndef __MWERKS__            // •• CW TCL
  1080. c94,317
  1081. a    itsIdleChores = new CChoreList;
  1082. a    itsUrgentChores = new CChoreList;
  1083. c317,317
  1084. c321,458
  1085. a#ifndef TCL_NO_PATCHES                    // •• CW TCL: okay, mostly no patches
  1086. c459,461
  1087. a#endif                                    // •• CW TCL
  1088. c462,478
  1089. a#ifndef TCL_NO_PATCHES                        // •• CW TCL
  1090. c479,480
  1091. a#endif                                        // •• CW TCL
  1092. c481,558
  1093. a    gDesktop = new CDesktop;
  1094. c560,570
  1095. a    gClipboard = new CClipboard(TRUE);
  1096. c572,1202
  1097. a#ifndef TCL_USE_PP_EXCEPTIONS            // •• CW TCL
  1098. c1203,1203
  1099. a#else                                    // •• CW TCL
  1100. a        catch_all_()                    // •• CW TCL
  1101. a#endif                                    // •• CW TCL
  1102. c1204,1204
  1103. a#ifndef TCL_USE_PP_EXCEPTIONS                    // •• CW TCL
  1104. c1205,1208
  1105. a#else                                            // •• CW TCL
  1106. a            short err = gLastError;                // •• CW TCL
  1107. a            if (err != kSilentErr)                // •• CW TCL
  1108. a                ErrorAlert(err, gLastMessage);    // •• CW TCL
  1109. a            HiliteMenu(0);                        // •• CW TCL
  1110. a#endif                                            // •• CW TCL
  1111. c1209,1229
  1112. a#ifndef TCL_USE_PP_EXCEPTIONS            // •• CW TCL
  1113. c1230,1230
  1114. a#else                                    // •• CW TCL
  1115. a        catch_all_()                    // •• CW TCL
  1116. a#endif                                    // •• CW TCL
  1117. c1231,1240
  1118. a#ifndef TCL_USE_PP_EXCEPTIONS                    // •• CW TCL
  1119. c1241,1244
  1120. a#else                                            // •• CW TCL
  1121. a            short err = gLastError;                // •• CW TCL
  1122. a            if (err != kSilentErr)                // •• CW TCL
  1123. a                ErrorAlert(err, gLastMessage);    // •• CW TCL
  1124. a            HiliteMenu(0);                        // •• CW TCL
  1125. a#endif                                            // •• CW TCL
  1126. c1245,1919
  1127. a    return new CAppleEvent(theEvent, theReply, theRefCon);
  1128. c1921,2308
  1129. a                    ((CProperty*) new CProperty(this, prop, cBoolean))->
  1130. c2310,2313
  1131. a                    (new CProperty(this, prop, cIntlText))->MakeToken(theToken);
  1132. c2311,2312
  1133. c2317,2317
  1134. a                    (new CProperty(this, prop, cLongInteger))->MakeToken(theToken);
  1135. c2311,2311
  1136. c2320,2397
  1137. a// TEMPORARY: just include it here!
  1138. c2396,2397
  1139. a#if defined(__MWERKS__) && !defined(TCL_POWER_PC) \
  1140. a            && !defined(TCL_NO_PATCHES)                    // •• CW TCL
  1141. a#include "CApplication.asm"                                // •• CW TCL
  1142. a#endif                                                    // •• CW TCL
  1143. e
  1144. fCArray.cp
  1145. i
  1146. fCArrayIterator.cp
  1147. i
  1148. fCBartender.cp
  1149. x517556037,96791749
  1150. c0,332
  1151. a        theChore = new CMBarChore;
  1152. c334,1184
  1153. e
  1154. fCBureaucrat.cp
  1155. i
  1156. fCChore.cp
  1157. i
  1158. fCClipboard.cp
  1159. x253170836,390340112
  1160. c0,41
  1161. a#include "CAppleEvent.h"                // •• CW TCL
  1162. a#include "CWatchDesc.h"                    // •• CW TCL
  1163. a#include "TCLUtilities.h"                // •• CW TCL
  1164. c42,559
  1165. a            CPicture *pict = new CPicture;
  1166. c561,570
  1167. a            CEditText *text = new CEditText;
  1168. c572,885
  1169. e
  1170. fCCollaborator.cp
  1171. x16538233,361490746
  1172. c0,29
  1173. a#ifdef TCL_NO_TEMPLATES                    // •• CW TCL
  1174. aCW_Decl_PtrArray(CCollaborator)            // •• CW TCL
  1175. aCW_Inst_PtrArray(CCollaborator)            // •• CW TCL
  1176. a#else                                    // •• CW TCL
  1177. c30,32
  1178. a#endif                                    // •• CW TCL
  1179. c33,326
  1180. c2,2
  1181. e
  1182. fCCollection.cp
  1183. x252630584,436024412
  1184. c0,32
  1185. a#ifdef __MWERKS__                        // •• CW TCL: apparently no default copy constructor
  1186. aCCollection::CCollection(CCollection& source) : CCollaborator(source)
  1187. c41,41
  1188. a    numItems = source.numItems;
  1189. c42,42
  1190. a#endif                                    // •• CW TCL
  1191. c36,36
  1192. c36,36
  1193. c45,45
  1194. c35,105
  1195. e
  1196. fCControl.cp
  1197. i
  1198. fCDecorator.cp
  1199. i
  1200. fCDesktop.cp
  1201. x284928163,456018019
  1202. c0,95
  1203. a    itsFloats = new CWindowList;                // Initialize our list of floating
  1204. a                                                //   windows
  1205. c98,143
  1206. a    itsWindows = new CWindowList;        // Initialize our window list
  1207. c145,1109
  1208. a    return (CWindow*) itsWindows->NthItem(index);        // •• CW TCL
  1209. c1111,1145
  1210. a    return (CWindow*) itsWindows->FindItem1(fun, param);    // •• CW TCL
  1211. c1147,1184
  1212. e
  1213. fCDirector.cp
  1214. i
  1215. fCDirectorOwner.cp
  1216. i
  1217. fCDocument.cp
  1218. x259718951,83711138
  1219. c0,37
  1220. a#include "TCLpstring.h"
  1221. c38,59
  1222. c61,61
  1223. c60,1145
  1224. a                    (new CProperty(this, pIsModified, cBoolean))->MakeToken(theToken);
  1225. c1148,1270
  1226. e
  1227. fCEnvironment.cp
  1228. i
  1229. fCEnvirons.cpp
  1230. x132466784,410244561
  1231. c0,38
  1232. a#include "Global.h"                        // •• CW TCL
  1233. c40,40
  1234. c39,220
  1235. e
  1236. fCError.cp
  1237. i
  1238. fCFile.cp
  1239. i
  1240. fCMBarChore.cp
  1241. i
  1242. fCMouseTask.cp
  1243. i
  1244. fCPane.cp
  1245. x230873354,215921013
  1246. c0,20
  1247. a#include "Constants.h"                    // •• CW TCL
  1248. c21,29
  1249. c31,2033
  1250. e
  1251. fCPaneBorder.cp
  1252. i
  1253. fCPanorama.cp
  1254. i
  1255. fCPicture.cp
  1256. i
  1257. fCPrinter.cp
  1258. i
  1259. fCRunArray.cp
  1260. i
  1261. fCScrollBar.cp
  1262. i
  1263. fCScrollPane.cp
  1264. x128728212,114617106
  1265. c0,174
  1266. a        itsHorizSBar = new CScrollBar;
  1267. c176,184
  1268. a        itsVertSBar = new CScrollBar;
  1269. c186,194
  1270. a        itsSizeBox = new CSizeBox;
  1271. c196,702
  1272. e
  1273. fCSizeBox.cp
  1274. i
  1275. fCSwitchboard.cp
  1276. i
  1277. fCTask.cp
  1278. i
  1279. fCView.cp
  1280. i
  1281. fCVoidPtrArray.cp
  1282. i
  1283. fCVoidPtrArrayIterator.cp
  1284. i
  1285. fCWindow.cp
  1286. i
  1287. fGlobalVars.cp
  1288. i
  1289. z6489,Exceptions.asm
  1290. /******************************************************************************
  1291.  Exceptions.asm
  1292.  
  1293.         Exception handling library for the THINK Class Library.
  1294.  
  1295.     Copyright © 1992, 1993, 1994 Symantec Corporation. All rights reserved.
  1296.  
  1297.     Based on material copyrighted by Apple Computer, Inc., 1985-1988.
  1298.  
  1299.     This file is only used with TCL exceptions, i.e., when USE_BEL
  1300.     is undefined.
  1301.  ******************************************************************************/
  1302.  
  1303. #include "Exceptions.h"
  1304.  
  1305. #ifndef TCL_USE_PP_EXCEPTIONS            // •• CW TCL: don’t use this file
  1306. #ifdef USE_BEL
  1307. \\\ERROR: Exceptions.asm should be removed from project when USE_BEL is defined
  1308. #endif
  1309.  
  1310.             // NO_TCL may be defined to use Exceptions
  1311.             // in a very limited fashion without the TCL
  1312.  
  1313. #if !defined NO_TCL && !defined PASCAL_EXCEPTIONS
  1314.  
  1315. #include <Packages.h>
  1316.  
  1317. #endif
  1318.  
  1319. #undef DBG
  1320. #ifdef  __TCL_DEBUG__                    // check if TCL debugging code is
  1321. #define DBG                                // enabled, if it is, then enable
  1322. #endif                                    // the private debugging symbol
  1323.  
  1324.  
  1325. extern FailInfo        *gTopHandler;
  1326.  
  1327. #ifndef PASCAL_EXCEPTIONS
  1328.  
  1329. extern short    gLastError;
  1330. extern long        gLastMessage;
  1331. extern char        gDefaultPropagation;
  1332.  
  1333. #ifdef DBG
  1334. extern char        gAskFailure;
  1335. extern char        gBreakFailure;
  1336. #endif
  1337.  
  1338. #else
  1339.  
  1340. extern char        *gDbgPascalExceptions;
  1341. #endif
  1342.  
  1343. #define        JMP_BUF_A6            36        // offset of reg a6 in jmp_buf
  1344.  
  1345. enum                                     // for handlerType field of FailInfo
  1346. {
  1347.     kCatchException,
  1348.     kTry,
  1349.     kCatchFailure
  1350. };
  1351.  
  1352. void NoHandler();
  1353. pascal void ThrowHandler(FailInfo*);
  1354.  
  1355. /******************************************************************************
  1356.  ThrowHandler
  1357.  
  1358.      Invokes the exception handler at the top of the stack.
  1359. ******************************************************************************/
  1360. static void AsmThrowHandler()
  1361. {
  1362.  
  1363.     asm        {
  1364.  
  1365. extern ThrowHandler:
  1366.  
  1367.         addq.l    #4, sp                            ; pop return address
  1368.         move.l    (sp)+, d0                        ; get pointer to FailInfo
  1369.         bne        @1                                ; make sure it's not NIL
  1370.         jsr        NoHandler                        ; exit if NIL - doesn't return
  1371.  
  1372.     @1    move.l    d0, a0                            ; load FailInfo to a0
  1373.         clr.w    d0                                ; dispatch on FailInfo->handlerType
  1374.         move.b  FailInfo.handlerType(a0), d0
  1375.         add.w    d0,d0
  1376.         add.w    @2(d0.w),d0
  1377.         jmp        @2(d0.w)
  1378.  
  1379.     @2    dc.w    @catchexception
  1380.         dc.w    @try
  1381.         dc.w    @catchfailure
  1382.  
  1383.     catchexception:
  1384.  
  1385.         lea        FailInfo.regs(a0), a0           ; point to jmp_buf
  1386.         movem.l    (a0),d3-d7/a1-a4/a6-a7            ; restore registers. note that
  1387.                                                 ; return address is already popped into a1
  1388.                                                 ; and a7 points to return value for the
  1389.                                                 ; original CatchSignal
  1390.         move.w    gLastError, (sp)                ; set error code
  1391.         jmp        (a1)
  1392.  
  1393.     try:
  1394.  
  1395.         lea      FailInfo.regs(a0), a0           ; point to jmp_buf
  1396.         movem.l    (a0),d3-d7/a1-a4/a6-a7            ; restore registers. note that
  1397.                                                 ; return address is already popped into a1
  1398.                                                 ; and a7 points to return value for the
  1399.                                                 ; original setjmp
  1400.         move.w    gLastError, d0                    ; set error code
  1401.         ext.l    d0                                ; extend in case of 4 byte int
  1402.         jmp        (a1)
  1403.  
  1404.  
  1405.     catchfailure:
  1406.  
  1407. #ifdef PASCAL_EXCEPTIONS
  1408.         tst.b    gDbgPascalExceptions            ; are we debugging?
  1409.         beq.s   @nodebug                        ; use different technique if we are
  1410.  
  1411.  
  1412.         move.l    a0, a4                            ; save fi in a4
  1413.         lea        FailInfo.regs(a4), a3            ; get the target a6 we will be
  1414.         move.l  JMP_BUF_A6(a3), a3                ; unwinding to in a3
  1415.  
  1416.         cmpa.l    a3, a6                            ; are we at same level?
  1417.         beq.s    @4
  1418.  
  1419.  
  1420. @3        trap    #0xC                            ; this resynchs the Pascal debugger
  1421.         movea.l    (a6), a6                        ; pop off dynamic links
  1422.         cmpa.l    a3, a6                            ; until we hit target a6
  1423.         bne.s    @3
  1424.  
  1425. @4        move.l  a4, a0                            ; put fi back in a0
  1426.                                                 ; no fall thru to nodebug case
  1427.  
  1428.     nodebug:
  1429. #endif
  1430.  
  1431.         movem.l    FailInfo.regs(a0),d3-d7/a1-a4/a6-a7
  1432.                                                 ; restore registers. note that
  1433.                                                 ; return address is already popped
  1434.                                                 ; into a1
  1435.  
  1436.  
  1437.         tst.w    gLastError                        ; if gLastError != noErr then
  1438.                                                 ; call handler, else retry
  1439.         beq.s    @retry
  1440.  
  1441.         move.w  gLastError, -(sp)                ; push error and message
  1442.         move.l  gLastMessage, -(sp)
  1443.  
  1444.         tst.l   FailInfo.A6Link(a0)                ; push static link if one
  1445.         beq.s    @nolink                            ; was provided
  1446.         move.l    FailInfo.A6Link(a0), -(sp)
  1447.  
  1448.     nolink:
  1449.         move.l    FailInfo.handlerProc(a0), a0
  1450.         jsr        (a0)                            ; call the handler
  1451.  
  1452.         move.w  gLastError, -(sp)                ; push error and message
  1453.         move.l  gLastMessage, -(sp)
  1454.  
  1455.         jsr        Failure                            ; propagate failure
  1456.                                                 ; doesn't return
  1457.  
  1458.     retry:
  1459.  
  1460.         jmp        (a1)                            ; return following CatchFailures
  1461.  
  1462.     }
  1463. }
  1464.  
  1465.  
  1466. /******************************************************************************
  1467.  CatchFailures
  1468.  
  1469. ******************************************************************************/
  1470. static void AsmCatchFailures()
  1471. {
  1472.     asm
  1473.     {
  1474.   extern CatchFailures:
  1475.  
  1476.         movea.l (sp)+, a1                                ; pop return address
  1477.         move.l    (sp)+, d0                                ; pop static link
  1478.         move.l    (sp)+, d1                                ; pop procptr
  1479.         movea.l (sp)+, a0                                ; pop failinfo
  1480.  
  1481.         movem.l    d3-d7/a1-a4/a6-a7, FailInfo.regs(a0)     ; save registers
  1482.         move.l    d0, FailInfo.A6Link(a0)                    ; save static link
  1483.         move.l    d1, FailInfo.handlerProc(a0)            ; save procptr
  1484.  
  1485.         move.b  #1, FailInfo.fPropagate(a0)                ; always propagates
  1486.  
  1487.                                                         ; set handler type
  1488.         move.b    #kCatchFailure, FailInfo.handlerType(a0)
  1489.  
  1490.         move.l    gTopHandler, FailInfo.next(a0)            ; link to next handler
  1491.         move.l    a0, gTopHandler                            ; stack top is new handler
  1492.  
  1493.         jmp        (a1)                                    ; return to caller
  1494.     }
  1495. }
  1496.  
  1497.  
  1498. /******************************************************************************
  1499.  CatchException
  1500.  
  1501.      Records the state of the calling routine in a FailInfo record and
  1502.      pushes this record onto the handler stack. Initially, zero is returned
  1503.      as the function result. If any call to Failure() occurs, the handler
  1504.      will be popped, and the caller will be resumed and the return value
  1505.      will be the error code passed to Failure().
  1506.  
  1507. ******************************************************************************/
  1508. static pascal short AsmCatchException()
  1509. {
  1510.     asm
  1511.     {
  1512.  
  1513.   extern CatchException:
  1514.  
  1515.         movea.l (sp)+, a1                                ; pop return address
  1516.         movea.l (sp)+, a0                                ; pop handler
  1517.         movem.l    d3-d7/a1-a4/a6-a7, FailInfo.regs(a0)     ; save registers
  1518.         clr.l    FailInfo.A6Link(a0)                        ; no A6 link for CatchSignal
  1519.                                                         ; set fPropagate
  1520.         move.b  gDefaultPropagation, FailInfo.fPropagate(a0)
  1521.  
  1522.                                                         ; set handler type
  1523.         move.b    #kCatchException, FailInfo.handlerType(a0)
  1524.  
  1525.         move.l    gTopHandler, FailInfo.next(a0)            ; link to next handler
  1526.         move.l    a0, gTopHandler                            ; stack top is new handler
  1527.  
  1528.         clr.w    (sp)                                    ; return noErr to caller
  1529.         jmp        (a1)
  1530.     }
  1531. }
  1532.  
  1533.  
  1534. #endif // #ifndef TCL_USE_PP_EXCEPTIONS        // •• CW TCL
  1535.  
  1536. o
  1537. o
  1538. rDialog Classes
  1539. fCDialog.cp
  1540. x535558154,526682450
  1541. c0,139
  1542. a        scrollPane = new CScrollPane;
  1543. c141,147
  1544. a    itsPanorama = new CPanorama;
  1545. c149,604
  1546. e
  1547. fCDialog.h
  1548. i
  1549. fCDialogDirector.cp
  1550. x286358392,165789854
  1551. c0,145
  1552. a    itsGopher = gopherInfo.firstGopher? (CBureaucrat*) (gopherInfo.firstGopher)
  1553. a                            : (CBureaucrat*) itsDialog;        // •• CW TCL: added typecasts
  1554. c147,274
  1555. a    itsGopher = gopherInfo.firstGopher? (CBureaucrat*) (gopherInfo.firstGopher)
  1556. a                            : (CBureaucrat*) itsDialog;        // •• CW TCL: added typecasts
  1557. c276,335
  1558. e
  1559. fCDialogDirector.h
  1560. x63186064,63186065
  1561. c0,24
  1562. c26,26
  1563. c25,46
  1564. e
  1565. fCDialogText.cp
  1566. x187463203,189493277
  1567. c0,188
  1568. a    border = new CPaneBorder;
  1569. c190,576
  1570. e
  1571. fCDialogText.h
  1572. i
  1573. fCDLOGDialog.cp
  1574. x412313134,185847690
  1575. c0,47
  1576. a#ifndef __MWERKS__                        // •• CW TCL
  1577. c48,48
  1578. a#endif                                    // •• CW TCL
  1579. c49,406
  1580. a    return foundView? (CView*) foundView : (CView*) itsPanorama;    // •• CW TCL: added typecasts
  1581. c408,441
  1582. a    btn = new CButton;
  1583. c443,460
  1584. a    CRadioControl *radio = new CRadioControl;
  1585. c462,487
  1586. a    CCheckBox *check = new CCheckBox;
  1587. c489,549
  1588. a        text = new CEditText;
  1589. c551,596
  1590. a    text = new CDialogText;
  1591. c598,623
  1592. a    icon = new CIconPane;
  1593. c625,641
  1594. a    CPicture *pict = new CPicture;
  1595. c635,635
  1596. c644,662
  1597. a    CPane *pane = new CPane;
  1598. c664,669
  1599. a    border = new CPaneBorder;
  1600. c671,883
  1601. e
  1602. fCDLOGDialog.h
  1603. i
  1604. fCDLOGDirector.cp
  1605. i
  1606. fCDLOGDirector.h
  1607. x365293667,365293676
  1608. c0,21
  1609. a    
  1610. c22,33
  1611. e
  1612. fCIntegerText.cp
  1613. i
  1614. fCIntegerText.h
  1615. x12233350,400869438
  1616. c0,16
  1617. a#include "CPanorama.h"                    // •• CW TCL: preempt nested #include limit
  1618. c17,87
  1619. e
  1620. o
  1621. rFile Classes
  1622. fCDataFile.cp
  1623. i
  1624. fCDataFile.h
  1625. i
  1626. fCPictFile.cp
  1627. i
  1628. fCPictFile.h
  1629. i
  1630. fCPNTGFile.cp
  1631. x207414813,104974483
  1632. c0,124
  1633. a        theBitMap = new CBitMap;            // Allocate a new bit map to hold
  1634. c126,210
  1635. e
  1636. fCPNTGFile.h
  1637. i
  1638. fCResFile.cp
  1639. i
  1640. fCResFile.h
  1641. i
  1642. o
  1643. rFW/Tearoffs
  1644. fCCharGrid.cp
  1645. x100012838,510707926
  1646. c0,127
  1647. a        itsEnvironment = new CTextEnvirons;
  1648. c129,172
  1649. e
  1650. fCCharGrid.h
  1651. i
  1652. fCFWDesktop.cp
  1653. i
  1654. fCFWDesktop.h
  1655. i
  1656. fCGridSelector.cp
  1657. i
  1658. fCGridSelector.h
  1659. i
  1660. fCMenuDefProc.cp
  1661. i
  1662. fCMenuDefProc.h
  1663. i
  1664. fCPaneMDEF.cp
  1665. i
  1666. fCPaneMDEF.h
  1667. i
  1668. fCPatternGrid.cp
  1669. i
  1670. fCPatternGrid.h
  1671. i
  1672. fCSelector.cp
  1673. i
  1674. fCSelector.h
  1675. i
  1676. fCSelectorMDEF.cp
  1677. i
  1678. fCSelectorMDEF.h
  1679. i
  1680. fCTearChore.cp
  1681. i
  1682. fCTearChore.h
  1683. i
  1684. fCTearOffMenu.cp
  1685. x501730647,29717269
  1686. c0,96
  1687. a    theTearChore = new CTearChore;        // Create and install an urgent
  1688. c98,99
  1689. a                                                // •• CW TCL
  1690. c100,101
  1691. e
  1692. fCTearOffMenu.h
  1693. i
  1694. fGenericMDEF.cp
  1695. x200340788,263988920
  1696. c0,26
  1697. aMenuDefUPP GenericMDEF = NewMenuDefProc(sGenericMDEF);
  1698. a                                    // •• CW TCL: this is a menu definition, not a menu *hook*
  1699. c28,68
  1700. e
  1701. fGenericMDEF.h
  1702. x346265065,532107767
  1703. c0,28
  1704. a    MenuDefUPP        defProc;                // •• CW TCL: corrected type
  1705. c30,35
  1706. aextern MenuDefUPP GenericMDEF;                // •• CW TCL: corrected type (it's an MDEF not a hook!)
  1707. c35,35
  1708. e
  1709. rWindoid WDEF ƒ
  1710. fWindoidWDEF.c
  1711. i
  1712. fWindoidWDEF.h
  1713. i
  1714. o
  1715. o
  1716. rMore Classes
  1717. fCBitMap.cp
  1718. i
  1719. fCBitMap.h
  1720. x393829702,463503481
  1721. c0,18
  1722. a#ifdef TCL_NO_TEMPLATES                    // •• CW TCL
  1723. aclass CBitMap;                            // •• CW TCL
  1724. aCW_Decl_StreamCalls(CBitMap)            // •• CW TCL
  1725. a#endif                                    // •• CW TCL
  1726. c21,21
  1727. c19,70
  1728. e
  1729. fCBitMapPane.cp
  1730. x172427485,30431481
  1731. c0,14
  1732. a#include "CBitMapPane.h"                        // •• CW TCL: removed <>
  1733. a#include "Global.h"                                // •• CW TCL: removed <>
  1734. c17,115
  1735. a        itsBitMap = new CBitMap;
  1736. c117,219
  1737. e
  1738. fCBitMapPane.h
  1739. i
  1740. fCStack.cp
  1741. i
  1742. fCStack.h
  1743. i
  1744. fCTextEnvirons.cp
  1745. i
  1746. fCTextEnvirons.h
  1747. i
  1748. o
  1749. rObject I/O
  1750. rHeaders
  1751. fCBufferedStream.h
  1752. x180971000,336016879
  1753. c0,11
  1754. a#include "CStream.h"                    // •• CW TCL: removed <>
  1755. c13,68
  1756. e
  1757. fCCountingStream.h
  1758. x216268539,492441692
  1759. c0,11
  1760. a#include "CStream.h"                // •• CW TCL: removed <>
  1761. c13,40
  1762. e
  1763. fCFileStream.h
  1764. x317632818,518849294
  1765. c0,11
  1766. a#include "CBufferedStream.h"            // Interface for its base class
  1767. a#include "CDataFile.h"
  1768. c14,50
  1769. e
  1770. fCHandleStream.h
  1771. i
  1772. fCSaver.h
  1773. x422705738,340532022
  1774. c0,11
  1775. a#include "CFileStream.h"                // •• CW TCL: omitted header
  1776. c12,16
  1777. a#ifndef TCL_NO_TEMPLATES                // •• CW TCL
  1778. c17,58
  1779. c2,2
  1780. a#else // #ifndef TCL_NO_TEMPLATES                // •• CW TCL
  1781. c2,2
  1782. a#define CW_Decl_Saver(T) \
  1783. aclass CSaver_ ## T : public CDocument { \
  1784. a  public: \
  1785. a    TCL_DECLARE_CLASS \
  1786. a    T                    *itsContents; \
  1787. a    CSaver_ ## T() { itsContents = NULL; } \
  1788. a    CSaver_ ## T(Boolean printable); \
  1789. a    ~CSaver_ ## T(); \
  1790. a    virtual void        NewFile(); \
  1791. a    virtual void        OpenFile(SFReply *macSFReply); \
  1792. a    virtual Boolean        DoSave(); \
  1793. a    virtual Boolean        DoSaveAs(SFReply *macSFReply); \
  1794. a    virtual void        DoRevert(); \
  1795. aprotected: \
  1796. a    virtual void        MakeNewWindow(void) = 0; \
  1797. a    virtual void        ReadDocument(); \
  1798. a    virtual void        WriteDocument(); \
  1799. a    virtual void        MakeNewContents(void) = 0; \
  1800. a    virtual void        ReadContents(CFileStream *aStream); \
  1801. a    virtual void        WriteContents(CFileStream *aStream); \
  1802. a    virtual void        ContentsToWindow(); \
  1803. a    virtual void        WindowToContents(); \
  1804. a    virtual void        ExistingFile(); \
  1805. a    virtual OSType        NewFileType(); \
  1806. a    virtual void        PositionWindow(); \
  1807. a    virtual void        MakeWindowName(Str255 name); \
  1808. c58,58
  1809. c2,2
  1810. a// copied from CSaver.tem
  1811. c2,2
  1812. a#define CW_Inst_Saver(T) \
  1813. aTCL_DEFINE_CLASS_M1(CSaver_ ## T, CDocument) \
  1814. aCSaver_ ## T::CSaver_ ## T(Boolean printable) : CDocument(printable) { \
  1815. a    itsContents = NULL; \
  1816. a    TCL_END_CONSTRUCTOR \
  1817. a} \
  1818. aCSaver_ ## T::~CSaver_ ## T() \
  1819. a{ \
  1820. a    TCL_START_DESTRUCTOR \
  1821. a    TCLForgetObject(itsContents); \
  1822. a} \
  1823. avoid CSaver_ ## T::NewFile() { \
  1824. a    Str255            title; \
  1825. a    MakeNewWindow(); \
  1826. a    MakeNewContents(); \
  1827. a    ContentsToWindow(); \
  1828. a    PositionWindow(); \
  1829. a    MakeWindowName(title); \
  1830. a    itsWindow->SetTitle(title); \
  1831. a    SetChanged(FALSE); \
  1832. a    itsWindow->Select(); \
  1833. a} \
  1834. avoid    CSaver_ ## T::OpenFile(SFReply *macSFReply) { \
  1835. a    CDataFile    *theFile = NULL; \
  1836. a    FSSpec        spec; \
  1837. a    try_ { \
  1838. a        theFile = new(CDataFile); \
  1839. a        theFile->IDataFile(); \
  1840. a        theFile->SFSpecify(macSFReply); \
  1841. a        theFile->GetFSSpec(&spec); \
  1842. a        FailOpen(&spec); \
  1843. a        theFile->Open(fsRdWrPerm); \
  1844. a        itsFile = theFile; \
  1845. a    } \
  1846. a    catch_all_() { \
  1847. a        TCLForgetObject(theFile); \
  1848. a    } \
  1849. a    end_try_ \
  1850. a    ReadDocument(); \
  1851. a} \
  1852. avoid    CSaver_ ## T::MakeWindowName(Str255 newName) { \
  1853. a    Str31        count; \
  1854. a    if (itsFile != NULL) \
  1855. a        itsFile->GetName(newName); \
  1856. a    else { \
  1857. a        itsWindow->GetTitle(newName); \
  1858. a        if (Length(newName) == 0) \
  1859. a            GetIndString(newName, STRcommon, strUNTITLED); \
  1860. a        NumToString(gDecorator->GetWCount(), count); \
  1861. a        ConcatPStrings(newName, (unsigned char *)"\p "); \
  1862. a        ConcatPStrings(newName, count); \
  1863. a    } \
  1864. a} \
  1865. avoid    CSaver_ ## T::PositionWindow() { \
  1866. a    gDecorator->PlaceNewWindow(itsWindow); \
  1867. a} \
  1868. avoid    CSaver_ ## T::ReadContents(CFileStream *aStream) { \
  1869. a    GetObject(*aStream, (T*) itsContents); \
  1870. a} \
  1871. avoid    CSaver_ ## T::ReadDocument() { \
  1872. a    CFileStream        *theStream = NULL; \
  1873. a    Str255            theName; \
  1874. a    try_ { \
  1875. a        theStream = NewInputFileStream((CDataFile*) itsFile); \
  1876. a        ReadContents(theStream); \
  1877. a           SetChanged(FALSE); \
  1878. a        delete theStream; \
  1879. a    } \
  1880. a    catch_all_() { \
  1881. a        delete theStream; \
  1882. a    } \
  1883. a    end_try_ \
  1884. a    if (itsWindow == NULL) \
  1885. a        MakeNewWindow(); \
  1886. a    ContentsToWindow(); \
  1887. a    PositionWindow(); \
  1888. a    MakeWindowName(theName); \
  1889. a    itsWindow->SetTitle(theName); \
  1890. a    itsWindow->Select(); \
  1891. a} \
  1892. avoid    CSaver_ ## T::WriteContents(CFileStream *aStream) { \
  1893. a    PutObject(*aStream, itsContents); \
  1894. a} \
  1895. avoid    CSaver_ ## T::WriteDocument() { \
  1896. a    CFileStream        *theStream = NULL; \
  1897. a    try_ { \
  1898. a        gApplication->SetCriticalOperation(TRUE); \
  1899. a        WindowToContents(); \
  1900. a        theStream = NewOutputFileStream((CDataFile*) itsFile); \
  1901. a        WriteContents(theStream); \
  1902. a        theStream->Close(); \
  1903. a        SetChanged(FALSE); \
  1904. a        delete theStream; \
  1905. a        gApplication->SetCriticalOperation(FALSE); \
  1906. a    } \
  1907. a    catch_all_() \
  1908. a    { \
  1909. a        delete theStream; \
  1910. a        gApplication->SetCriticalOperation(FALSE); \
  1911. a    } \
  1912. a    end_try_ \
  1913. a} \
  1914. aBoolean CSaver_ ## T::DoSave() { \
  1915. a    if (itsFile == NULL) \
  1916. a        return DoSaveFileAs(); \
  1917. a    else { \
  1918. a        WriteDocument(); \
  1919. a        return TRUE; \
  1920. a    } \
  1921. a} \
  1922. aOSType    CSaver_ ## T::NewFileType() { \
  1923. a    return gApplication->sfFileTypes[0]; \
  1924. a} \
  1925. aBoolean CSaver_ ## T::DoSaveAs(SFReply *macSFReply) { \
  1926. a    OSErr        theError; \
  1927. a    CDataFile    *theFile = NULL; \
  1928. a    FSSpec        spec; \
  1929. a    try_ { \
  1930. a        if (itsFile != NULL) \
  1931. a            TCLForgetObject(itsFile); \
  1932. a        theFile = new(CDataFile); \
  1933. a        theFile->IDataFile(); \
  1934. a        theFile->SFSpecify(macSFReply); \
  1935. a        theFile->GetFSSpec(&spec); \
  1936. a        FailOpen(&spec); \
  1937. a        itsFile = theFile; \
  1938. a        if (theFile->ExistsOnDisk()) \
  1939. a            ExistingFile(); \
  1940. a        itsFile->CreateNew(gSignature, NewFileType()); \
  1941. a        theFile->Open(fsRdWrPerm); \
  1942. a        itsWindow->SetTitle(macSFReply->fName); \
  1943. a    } \
  1944. a    catch_all_() { \
  1945. a        TCLForgetObject(theFile); \
  1946. a    } \
  1947. a    end_try_ \
  1948. a    itsFile = theFile; \
  1949. a    return DoSave() ; \
  1950. a} \
  1951. avoid CSaver_ ## T::DoRevert() { \
  1952. a    TCLForgetObject(itsWindow); \
  1953. a    delete itsContents; \
  1954. a    itsGopher = this; \
  1955. a    if (itsFile != NULL) \
  1956. a        ReadDocument(); \
  1957. a    else \
  1958. a        NewFile(); \
  1959. a} \
  1960. avoid CSaver_ ## T::ContentsToWindow() {} \
  1961. avoid CSaver_ ## T::WindowToContents() {} \
  1962. avoid CSaver_ ## T::ExistingFile() { \
  1963. a    itsFile->ThrowOut(); \
  1964. a}
  1965. c2,2
  1966. a#endif // #ifndef TCL_NO_TEMPLATES                // •• CW TCL
  1967. e
  1968. fCSaver.tem
  1969. i
  1970. fCStream.h
  1971. x456839493,31540791
  1972. c0,71
  1973. c73,175
  1974. c182,182
  1975. a#ifndef TCL_NO_TEMPLATES                    // •• CW TCL
  1976. c176,182
  1977. a#else                                        // •• CW TCL
  1978. c184,184
  1979. a#define CW_Decl_StreamCalls(T) \
  1980. a    CStream& GetObject(CStream&, T*&); \
  1981. a    CStream& PutObject(CStream&, T*); \
  1982. a    void PutObjectReference (CStream&, T*); \
  1983. a    void PutObject1(T* obj, long stream);
  1984. c184,184
  1985. c186,186
  1986. a// template instantiations copied from <CStream.tem>
  1987. c186,186
  1988. a#ifndef MAXCLASSNAMELEN
  1989. a#define MAXCLASSNAMELEN 255
  1990. c14,14
  1991. a#define CW_Inst_StreamCalls(T) \
  1992. aCStream& PutObject (CStream& stream, T* obj) { \
  1993. a    if (!stream.PutReference(obj)) { \
  1994. a        stream.AddReference(obj); \
  1995. a        stream.PutClassName(TCL_CLASSNAME_FROM_POINTER(obj)); \
  1996. a        obj->PutTo(stream); \
  1997. a    } \
  1998. a    return stream; \
  1999. a} \
  2000. a    \
  2001. aCStream& GetObject (CStream& stream, T*& obj) { \
  2002. a    char name[MAXCLASSNAMELEN+1]; \
  2003. a        \
  2004. a    stream.GetClassName(name, MAXCLASSNAMELEN); \
  2005. a        \
  2006. a    if (strlen(name) == 0) \
  2007. a        obj = (T*) stream.GetReference(); \
  2008. a    else { \
  2009. a        obj = (T*) new_by_name(name); \
  2010. a        if (obj == NULL) \
  2011. a        { \
  2012. a            Failure(paramErr, excNewByNameFailed); \
  2013. a        } \
  2014. a        try_ { \
  2015. a            stream.AddReference(obj); \
  2016. a            obj->GetFrom(stream); \
  2017. a        } \
  2018. a        catch_all_() { \
  2019. a            delete obj; \
  2020. a            obj = NULL; \
  2021. a        } \
  2022. a        end_try_ \
  2023. a    } \
  2024. a    return stream; \
  2025. a} \
  2026. a    \
  2027. avoid PutObjectReference (CStream& stream, T* obj) { \
  2028. a    if (!stream.PutReference(obj)) \
  2029. a        stream.PutPtr(NULL); \
  2030. a} \
  2031. avoid PutObject1(T* obj, long stream) { \
  2032. a    PutObject(* (CStream*) stream, obj); \
  2033. a} \
  2034. c192,192
  2035. a#endif  // #ifdef TCL_NO_TEMPLATES            // •• CW TCL
  2036. c192,192
  2037. c183,196
  2038. e
  2039. fCString.h
  2040. i
  2041. fReference.h
  2042. i
  2043. fStreamResources.h
  2044. i
  2045. o
  2046. rSource
  2047. fCBufferedStream.cp
  2048. x208576433,476573043
  2049. c0,18
  2050. a#include "CBufferedStream.h"                // •• CW TCL: removed <>
  2051. c20,20
  2052. a#include "CError.h"                            // •• CW TCL: removed <>
  2053. a#include "TCLUtilities.h"                    // •• CW TCL: removed <>
  2054. a#include "Global.h"                            // •• CW TCL: removed <>
  2055. a#include "StreamResources.h"                // •• CW TCL: removed <>
  2056. a#include "Exceptions.h"                        // •• CW TCL: removed <>
  2057. c26,451
  2058. e
  2059. fCCountingStream.cp
  2060. i
  2061. fCFileStream.cp
  2062. x229641960,485714128
  2063. c0,30
  2064. a#include "CFileStream.h"                    // •• CW TCL: removed <>
  2065. c32,32
  2066. a#include "CError.h"                            // •• CW TCL: removed <>
  2067. a#include "TCLUtilities.h"                    // •• CW TCL: removed <>
  2068. a#include "Global.h"                            // •• CW TCL: removed <>
  2069. a#include "StreamResources.h"                // •• CW TCL: removed <>
  2070. a#include "Exceptions.h"                        // •• CW TCL: removed <>
  2071. c38,311
  2072. e
  2073. fCHandleStream.cp
  2074. x229479417,85026247
  2075. c0,18
  2076. a#include "CHandleStream.h"                // •• CW TCL: removed <>
  2077. a#include "string.h"                        // •• CW TCL: removed <>
  2078. a#include "CError.h"                        // •• CW TCL: removed <>
  2079. a#include "TCLUtilities.h"                // •• CW TCL: removed <>
  2080. a#include "Global.h"                        // •• CW TCL: removed <>
  2081. a#include "StreamResources.h"            // •• CW TCL: removed <>
  2082. a#include "Exceptions.h"                    // •• CW TCL: removed <>
  2083. c26,253
  2084. e
  2085. fCSaver.cp
  2086. i
  2087. fCStream.cp
  2088. x450946321,5876961
  2089. c0,26
  2090. a//#ifndef __pascal__                        // •• CW TCL: apparently not needed
  2091. a//#include <pascal.h>                        // •• CW TCL
  2092. a//#endif                                    // •• CW TCL
  2093. c30,30
  2094. a#ifdef TCL_NO_TEMPLATES 
  2095. aCW_Decl_StreamCalls(CCollaborator)
  2096. c29,30
  2097. c32,909
  2098. e
  2099. fCString.cpp
  2100. i
  2101. o
  2102. o
  2103. dPrecompiled Headers
  2104. rTable Classes
  2105. fCArrayPane.cp
  2106. i
  2107. fCArrayPane.h
  2108. i
  2109. fCTable.cp
  2110. x500807718,30864284
  2111. c0,250
  2112. a    itsRows = new CRunArray;
  2113. c252,252
  2114. a    itsCols = new CRunArray;
  2115. c254,300
  2116. a    textEnvirons = new CTextEnvirons;
  2117. c302,388
  2118. a    tblTask = new CTableDragger;
  2119. c390,2017
  2120. a            border = new CPaneBorder;
  2121. c2019,2256
  2122. e
  2123. fCTable.h
  2124. i
  2125. fCTableDragger.cp
  2126. i
  2127. fCTableDragger.h
  2128. i
  2129. o
  2130. fTCL #includes.cpp
  2131. x401147845,457558807
  2132. c0,6
  2133. a#ifndef __cplusplus                    // •• CW TCL
  2134. c8,12
  2135. a#ifndef TCL_USE_PP_EXCEPTIONS        // •• CW TCL: optional replacement of BEL
  2136. c13,13
  2137. a#endif                                // •• CW TCL
  2138. c14,69
  2139. a//#define BR_USE_NEW_HELPER                    // •• CW TCL: can’t seem to compile TCL_NEW macro (aargh!)
  2140. c71,83
  2141. a#ifndef __MWERKS__                            // •• CW TCL: already included
  2142. c84,84
  2143. a#endif                                        // •• CW TCL
  2144. c83,83
  2145. c86,107
  2146. a#ifndef TCL_NO_PRECOMPILED_CLASS            // •• CW TCL
  2147. c109,117
  2148. a#endif                                        // •• CW TCL
  2149. c118,120
  2150. c118,118
  2151. c121,125
  2152. a#ifndef TCL_NO_PRECOMPILED_CLASS            // •• CW TCL
  2153. c126,139
  2154. a#ifndef TCL_NO_PRECOMPILED_WATCHDESC        // •• CW TCL
  2155. c140,140
  2156. a#endif                                        // •• CW TCL
  2157. c141,183
  2158. a#endif // TCL_NO_PRECOMPILED_CLASS            // •• CW TCL
  2159. c183,183
  2160. c185,185
  2161. c184,184
  2162. c6,6
  2163. e
  2164. rTCL Libraries
  2165. rTCL Library headers
  2166. fCException.h
  2167. x425801894,18056068
  2168. c0,10
  2169. a#ifndef TCL_USE_PP_EXCEPTIONS                // •• CW TCL
  2170. c15,15
  2171. c11,33
  2172. c2,2
  2173. a#endif // #ifndef TCL_USE_PP_EXCEPTIONS        // •• CW TCL
  2174. e
  2175. fExceptions.h
  2176. x386874554,111864121
  2177. c0,10
  2178. a#ifdef TCL_USE_PP_EXCEPTIONS            // •• CW TCL: replace header if using PowerPlant exceptions
  2179. a#include "Exceptions_PP.h"
  2180. a#else                                    // •• CW TCL
  2181. c11,20
  2182. a#include "TCLClassInfo.h"                // •• CW TCL: removed < >
  2183. c22,70
  2184. a#ifndef TCL_NO_DEBUGGER_CALLS            // •• CW TCL
  2185. c71,73
  2186. a#else                                    // •• CW TCL
  2187. a#define _TCL_DEBUG_CATCH ((void)0);
  2188. a#endif                                    // •• CW TCL
  2189. c74,110
  2190. a#include "BRExcDef.h"                    // •• CW TCL: removed <>
  2191. c112,331
  2192. c330,330
  2193. a#endif // #ifndef TCL_USE_PP_EXCEPTIONS                // •• CW TCL
  2194. e
  2195. fLongCoordinates.h
  2196. i
  2197. fLongQD.h
  2198. i
  2199. fOSChecks.h
  2200. i
  2201. fqsort++.h
  2202. i
  2203. fTBUtilities.h
  2204. i
  2205. fTCL.h
  2206. i
  2207. fTCLClassInfo.h
  2208. x77157204,343800843
  2209. c0,14
  2210. a#ifndef TCL_NO_MULTIPLE_STATIC_INHERITANCE            // •• CW TCL: new problems
  2211. c19,19
  2212. a                                                    // •• CW TCL: added prototypes
  2213. c15,15
  2214. a        static void* _TCLNew##name(); \
  2215. c16,20
  2216. a        static void* _TCLNew##name##_##T(); \
  2217. a        void* _TCLNew##name##_##T() { return TCL_NEW(name##<##T##>,()); } \
  2218. c22,25
  2219. a#else // TCL_NO_MULTIPLE_STATIC_INHERITANCE            // •• CW TCL
  2220. c26,26
  2221. c15,15
  2222. a        static void* _TCLNew##name(); \
  2223. c16,16
  2224. a        BR_CClassInfo BR_SHARED_DATA \
  2225. a            _##name##_gClassInfo(#name, sizeof(name), _##name##_gAncestors); \
  2226. a        BR_CClassInfo& name::BedStaticGetClassInfo() { return _##name##_gClassInfo; } \
  2227. a        BR_ClassReference* name::BedGetAncestors() { return _##name##_gAncestors; }
  2228. c34,34
  2229. a                                                    // for now, there’s no template support...
  2230. c34,34
  2231. a#endif // TCL_NO_MULTIPLE_STATIC_INHERITANCE        // •• CW TCL
  2232. c34,34
  2233. c34,34
  2234. c33,33
  2235. c28,150
  2236. a#ifndef TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  2237. c151,151
  2238. a#else // TCL_NO_MULTIPLE_STATIC_INHERITANCE                // •• CW TCL
  2239. a#define member(p, T) ((p)->BedVirtualGetClassInfo()->IsKindOf(&T::BedStaticGetClassInfo()))
  2240. a#endif // TCL_NO_MULTIPLE_STATIC_INHERITANCE            // •• CW TCL
  2241. c1,1
  2242. c153,153
  2243. e
  2244. fTCLCoordUtil.h
  2245. x435541449,339307691
  2246. c0,10
  2247. a#ifndef TCL_NO_TEMPLATES                        // •• CW TCL
  2248. c17,17
  2249. c11,45
  2250. c2,2
  2251. c2,2
  2252. a#else                                            // •• CW TCL
  2253. c2,2
  2254. a#define TCLScale(unscaled, scaleFactor) (unscaled * scaleFactor)
  2255. a#define TCLUnscale(scaled, scaleFactor) ((scaled + scaleFactor - 1) / scaleFactor)
  2256. a#define TCLCenter(low, high) ((low + high) >> 1)
  2257. a#define TCLDimension(low, high) (high - low)
  2258. a#define TCLDelta(newValue, oldValue) (newValue - oldValue)
  2259. c2,2
  2260. a#endif                                    // •• CW TCL
  2261. e
  2262. fTCLFolderUtilities.h
  2263. i
  2264. fTCLForceReferences.h
  2265. i
  2266. fTCLNulls.h
  2267. i
  2268. fTCLpstring.h
  2269. i
  2270. fTCLUtilities.h
  2271. i
  2272. o
  2273. rTCL Library sources
  2274. falloc.cp
  2275. x223550810,73746350
  2276. c0,18
  2277. a#ifndef __MWERKS__                    // •• CW TCL
  2278. c19,19
  2279. a#endif                                // •• CW TCL
  2280. c20,23
  2281. a#ifdef __MWERKS__                    // •• CW TCL
  2282. a#define TCL_NO_INSPECTOR            // •• CW TCL
  2283. a#endif                                // •• CW TCL
  2284. c27,27
  2285. c24,33
  2286. a#ifdef __MWERKS__                    // •• CW TCL: I like the MW implementation better
  2287. a#define OPERATOR_NEW _cw_operator_new
  2288. a#define OPERATOR_DELETE _cw_operator_delete
  2289. a#if TCL_CW_VERSION>2
  2290. a#ifdef TCL_POWER_PC
  2291. a#include <NewPPC.cp>
  2292. a#else
  2293. a#include <New68K.cp>
  2294. a#endif // TCL_POWER_PC
  2295. a#else // TCL_CW_VERSION>2
  2296. a#include <New.cp>
  2297. a#endif // TCL_CW_VERSION>2
  2298. a#endif // __MWERKS__
  2299. c38,38
  2300. c34,38
  2301. a#ifndef __MWERKS__                    // •• CW TCL
  2302. c39,48
  2303. a#else                                // •• CW TCL
  2304. a    p = OPERATOR_NEW(objSize);        // •• CW TCL
  2305. a#endif                                // •• CW TCL
  2306. c51,51
  2307. c50,66
  2308. a#ifndef __MWERKS__                    // •• CW TCL
  2309. c67,67
  2310. a#else                                // •• CW TCL
  2311. a    OPERATOR_DELETE(objStorage);    // •• CW TCL
  2312. a#endif                                // •• CW TCL
  2313. c57,57
  2314. e
  2315. fExceptions.asm
  2316. i
  2317. fExceptions.cp
  2318. x219474586,366144085
  2319. c0,15
  2320. c23,23
  2321. c17,25
  2322. a#include "Global.h"                        // •• CW TCL
  2323. c26,46
  2324. a#ifndef __MWERKS__                            // •• CW TCL: not available in CodeWarrior
  2325. c47,47
  2326. a#endif                                        // •• CW TCL
  2327. c48,52
  2328. a#ifndef TCL_USE_PP_EXCEPTIONS                // •• CW TCL
  2329. c53,53
  2330. a#endif                                        // •• CW TCL
  2331. c54,60
  2332. a#ifndef __MWERKS__                            // •• CW TCL
  2333. c61,62
  2334. a#endif                                        // •• CW TCL
  2335. c63,70
  2336. a#ifndef TCL_USE_PP_EXCEPTIONS                // •• CW TCL
  2337. c71,87
  2338. a#endif                                        // •• CW TCL
  2339. c88,88
  2340. c90,90
  2341. c89,94
  2342. a#ifndef TCL_USE_PP_EXCEPTIONS                // •• CW TCL
  2343. c95,96
  2344. a#endif                                        // •• CW TCL
  2345. c99,99
  2346. c98,112
  2347. a#ifndef TCL_USE_PP_EXCEPTIONS                // •• CW TCL: this stuff is covered by PP
  2348. c120,120
  2349. c114,142
  2350. a    #ifndef TCL_NO_DEBUGGER_CALLS                    // •• CW TCL
  2351. c143,143
  2352. a    #endif                                            // •• CW TCL
  2353. c21,21
  2354. c148,148
  2355. c465,465
  2356. c161,161
  2357. c149,149
  2358. c152,152
  2359. c168,168
  2360. c151,161
  2361. a#endif // #ifndef TCL_USE_PP_EXCEPTIONS        // •• CW TCL
  2362. c162,179
  2363. a#ifndef TCL_NO_DEBUGGER_CALLS                // •• CW TCL
  2364. c197,197
  2365. a#endif                                        // •• CW TCL
  2366. c198,199
  2367. c183,196
  2368. a#ifndef TCL_NO_DEBUGGER_CALLS                // •• CW TCL
  2369. c214,214
  2370. a#endif                                        // •• CW TCL
  2371. c215,216
  2372. c200,213
  2373. a#ifndef TCL_NO_DEBUGGER_CALLS                // •• CW TCL
  2374. c237,237
  2375. a#endif                                        // •• CW TCL
  2376. c238,239
  2377. c217,236
  2378. a#ifndef TCL_NO_DEBUGGER_CALLS                // •• CW TCL
  2379. c257,257
  2380. a#endif                                        // •• CW TCL
  2381. c258,265
  2382. c246,256
  2383. a#ifndef TCL_NO_DEBUGGER_CALLS                // •• CW TCL
  2384. c180,180
  2385. a#endif                                        // •• CW TCL
  2386. c314,315
  2387. c240,245
  2388. c266,309
  2389. a#ifndef TCL_NO_DEBUGGER_CALLS                // •• CW TCL
  2390. c310,310
  2391. a#endif                                        // •• CW TCL
  2392. c315,315
  2393. c312,325
  2394. a#elif defined(TCL_USE_PP_EXCEPTIONS)        // •• CW TCL: PP exceptions
  2395. c327,327
  2396. c318,319
  2397. a    Throw_('err ');                            // ??? perhaps define a constant
  2398. c334,334
  2399. c326,347
  2400. a#ifndef TCL_NO_DEBUGGER_CALLS                        // •• CW TCL
  2401. c348,348
  2402. a#endif                                                // •• CW TCL
  2403. c466,466
  2404. c462,462
  2405. c351,433
  2406. a#ifndef TCL_NO_DEBUGGER_CALLS                        // •• CW TCL
  2407. c434,434
  2408. a#endif                                                // •• CW TCL
  2409. c445,445
  2410. c32,32
  2411. c445,445
  2412. c438,463
  2413. a#ifndef TCL_NO_DEBUGGER_CALLS                // •• CW TCL
  2414. c464,464
  2415. a#endif                                        // •• CW TCL
  2416. c146,146
  2417. c34,35
  2418. c468,596
  2419. a#ifdef __MWERKS__                        // •• CW TCL
  2420. a#define pascal
  2421. a#endif                                    // •• CW TCL
  2422. c597,675
  2423. e
  2424. fLongCoordinates.cp
  2425. i
  2426. fLongQD.cp
  2427. i
  2428. fOSChecks.cp
  2429. x283168480,120199846
  2430. c0,24
  2431. a           file TCLUtilities.asm .
  2432. c26,38
  2433. a// #if !defined(TCL_POWER_PC)                // •• CW TCL
  2434. c40,78
  2435. a// #endif                                // •• CW TCL
  2436. c80,137
  2437. a#ifdef __MWERKS__                            // •• CW TCL
  2438. astatic void AsmCacheFlush()                    // •• CW TCL
  2439. a    ONEWORDINLINE(_CacheFlushTrap);            // •• CW TCL
  2440. a#endif                                        // •• CW TCL
  2441. c137,140
  2442. a#ifndef TCL_POWER_PC                        // •• CW TCL
  2443. a        AsmCacheFlush();
  2444. a#else                                        // •• CW TCL
  2445. a        CallOSTrapUniversalProc(GetOSTrapAddress(_CacheFlushTrap), kRegisterBased);
  2446. a#endif                                        // •• CW TCL
  2447. a        
  2448. c142,142
  2449. e
  2450. fqsort++.cp
  2451. i
  2452. fTBUtilities.cp
  2453. i
  2454. fTCLCoordUtilities.cpp
  2455. i
  2456. fTCLFolderUtilities.cp
  2457. x51707376,337810816
  2458. c0,10
  2459. a#include "TCL.h"                        // •• CW TCL
  2460. c11,471
  2461. e
  2462. fTCLpstring.cp
  2463. x154155038,455806996
  2464. c0,13
  2465. a// #include <BDC.h>                                // •• CW TCL: didn’t really need that anyway...
  2466. c15,102
  2467. e
  2468. fTCLUtilities.asm
  2469. i
  2470. fTCLUtilities.cp
  2471. i
  2472. o
  2473. o
  2474. rTemplates
  2475. fCList.cpp
  2476. i
  2477. fCList.h
  2478. x85404750,112513629
  2479. c0,15
  2480. a#ifndef TCL_NO_TEMPLATES                    // •• CW TCL
  2481. c16,29
  2482. c2,2
  2483. a#else // #ifndef TCL_NO_TEMPLATES                // •• CW TCL
  2484. c2,2
  2485. a#include "CStream.h"
  2486. c2,2
  2487. a#define CW_Decl_List(T) \
  2488. aCW_Decl_PtrArray(T) \
  2489. aCW_Decl_StreamCalls(T) \
  2490. aclass CList_ ## T : public CPtrArray_ ## T { \
  2491. a  public: \
  2492. a    TCL_DECLARE_CLASS \
  2493. a    CList_ ## T(short blockSize = 3) : CPtrArray_ ## T(blockSize) {} \
  2494. a    CList_ ## T(CList_ ## T & source) : CPtrArray_ ## T(source) { } \
  2495. a    virtual void *Copy() { return TCL_NEW(CList_ ## T, (*this)); } \
  2496. a    virtual void        PutItems(CStream& stream); \
  2497. a    virtual void        GetItems(CStream& stream); \
  2498. c29,29
  2499. c2,2
  2500. c2,2
  2501. a// copied from CList.tem
  2502. c2,2
  2503. a// assumes that TCL_OBJECT_IO is defined since preprocessor macros
  2504. a// can’t be included in #define statements
  2505. c2,2
  2506. a#define CW_Inst_List(T) \
  2507. aTCL_DEFINE_CLASS_M1(CList_ ## T, CPtrArray_ ## T) \
  2508. avoid CList_ ## T::PutItems(CStream& stream) { \
  2509. a    extern void PutObject1(T*, long); \
  2510. a    DoForEach1(PutObject1, (long) &stream); \
  2511. a} \
  2512. avoid CList_ ## T::GetItems(CStream& stream) { \
  2513. a    long    num; \
  2514. a    T*        obj; \
  2515. a    items = (LongHandle) hItems; \
  2516. a    num = numItems; \
  2517. a    numItems = 0; \
  2518. a    try_ { \
  2519. a        while (num--) { \
  2520. a            GetObject(stream, obj); \
  2521. a            Add(obj); \
  2522. a        } \
  2523. a    } \
  2524. a    catch_all_() { \
  2525. a        DisposeItems(); \
  2526. a    } \
  2527. a    end_try_ \
  2528. a}
  2529. c2,2
  2530. a#endif // #ifndef TCL_NO_TEMPLATES                // •• CW TCL
  2531. e
  2532. fCList.tem
  2533. i
  2534. fCListIterator.cp
  2535. i
  2536. fCListIterator.h
  2537. i
  2538. fCList_CView.cpp
  2539. i
  2540. fCPtrArray.cp
  2541. i
  2542. fCPtrArray.h
  2543. x526251118,12341190
  2544. c0,13
  2545. a#ifndef TCL_NO_TEMPLATES                // •• CW TCL
  2546. c14,69
  2547. a    void        DoForEach1(EachFunc1 f, long l) { CVoidPtrArray::DoForEach1((vEachFunc1)f,l); } \
  2548. a    T*            FindItem(TestFunc f) { return (T*)CVoidPtrArray::FindItem((vTestFunc)f); } \
  2549. a    T*            FindItem1(TestFunc1 f, long param) { return (T*)CVoidPtrArray::FindItem1((vTestFunc1)f,param); } \
  2550. a    long        Offset(T* theObject) { return CVoidPtrArray::Offset(theObject); } \
  2551. a    void        Append(T* theObject) { CVoidPtrArray::Add(theObject); } \
  2552. a    void        Prepend(T* theObject) { CVoidPtrArray::InsertAt(theObject,1); } \
  2553. a    void        InsertAfter(T* theObject, T* afterObject) { CVoidPtrArray::InsertAfter(theObject, afterObject); } \
  2554. a    void        InsertAt(T* theObject, long index) { CVoidPtrArray::InsertAt(theObject, index); } \
  2555. a    void        BringFront(T* theObject) { CVoidPtrArray::BringFront(theObject); } \
  2556. a    void        SendBack(T* theObject) { CVoidPtrArray::SendBack(theObject); } \
  2557. a    void        MoveUp(T* theObject) { CVoidPtrArray::MoveUp(theObject); } \
  2558. a    void        MoveDown(T* theObject) { CVoidPtrArray::MoveDown(theObject); } \
  2559. a    void        MoveToIndex(T* theObject, long index) { CVoidPtrArray::MoveToIndex(theObject, index); } \
  2560. a    T*            FirstItem(void) { return (T*)CVoidPtrArray::FirstItem(); } \
  2561. a    T*            LastItem(void) { return (T*)CVoidPtrArray::LastItem(); } \
  2562. a    T*            NthItem(long n) { return (T*)CVoidPtrArray::NthItem(n); } \
  2563. a    long        FindIndex(T* theObject) { return CVoidPtrArray::FindIndex(theObject); } \
  2564. a    T*            FirstSuccess(TestFunc testFunc) { return (T*)CVoidPtrArray::FirstSuccess((vTestFunc)testFunc); } \
  2565. a    T*            FirstSuccess1(TestFunc1 testFunc, long param) { return (T*)CVoidPtrArray::FirstSuccess1((vTestFunc1)testFunc,param); } \
  2566. a    T*            LastSuccess(TestFunc testFunc) { return (T*)CVoidPtrArray::LastSuccess((vTestFunc)testFunc); } \
  2567. a    T*            LastSuccess1(TestFunc1 testFunc, long param) { return (T*)CVoidPtrArray::LastSuccess1((vTestFunc1)testFunc, param); } \
  2568. c70,70
  2569. c2,2
  2570. a#else // #ifndef TCL_NO_TEMPLATES                // •• CW TCL
  2571. c2,2
  2572. a#define CW_Decl_PtrArray(T) \
  2573. aclass CPtrArray_ ## T : public CVoidPtrArray { \
  2574. a  public: \
  2575. a    TCL_DECLARE_CLASS \
  2576. a    CPtrArray_ ## T(short blockSize = 3); \
  2577. a    CPtrArray_ ## T(CPtrArray_ ## T & source) : CVoidPtrArray(source) { } \
  2578. a    virtual ~CPtrArray_ ## T() {} \
  2579. a    virtual CPtrArray_ ## T *Copy() { return TCL_NEW(CPtrArray_ ## T, (*this)); } \
  2580. a    void IList() {} \
  2581. a    typedef void (*EachFunc)(T* obj); \
  2582. a    typedef void (*EachFunc1)(T* obj, long param); \
  2583. a    typedef Boolean (*TestFunc)(T* obj); \
  2584. a    typedef Boolean (*TestFunc1)(T* obj, long param); \
  2585. a    void        DisposeAll(); \
  2586. a    void        DisposeItems(); \
  2587. a    void        Add(T* theObject) { CVoidPtrArray::Add(theObject); } \
  2588. a    void        Remove(T* theObject) { CVoidPtrArray::Remove(theObject); } \
  2589. a    Boolean        Includes(T* theObject) { return CVoidPtrArray::Includes(theObject); } \
  2590. a    void        DoForEach(EachFunc f) { CVoidPtrArray::DoForEach((vEachFunc)f); } \
  2591. c70,70
  2592. c2,2
  2593. c2,2
  2594. a// copied from CPtrArray.tem
  2595. c2,2
  2596. a#define CW_Inst_PtrArray(T) \
  2597. aTCL_DEFINE_CLASS_M1(CPtrArray_ ## T, CVoidPtrArray) \
  2598. aCPtrArray_ ## T::CPtrArray_ ## T(short theBlockSize) : CVoidPtrArray(theBlockSize) { } \
  2599. avoid CPtrArray_ ## T::DisposeAll() { DisposeItems(); TCLForgetThis(); } \
  2600. avoid CPtrArray_ ## T::DisposeItems() { \
  2601. a    for (long i = 0; i < numItems; i++) { \
  2602. a        T* itemToPurge = (T*) (*items)[i]; \
  2603. a        (*items)[i] = 0; \
  2604. a        TCLForgetObject(itemToPurge); \
  2605. a        long index = i+1; \
  2606. a        BroadcastChange(arrayDeleteElement, &index); \
  2607. a    } \
  2608. a    numItems = 0; \
  2609. a    if (slots >  blockSize) \
  2610. a        Resize(blockSize); \
  2611. a}
  2612. c2,2
  2613. c2,2
  2614. a#endif // #ifndef TCL_NO_TEMPLATES                // •• CW TCL
  2615. e
  2616. fCPtrArray.tem
  2617. i
  2618. fCPtrArrayIterator.cpp
  2619. i
  2620. fCPtrArrayIterator.h
  2621. x457940209,289767268
  2622. c0,20
  2623. a#ifndef TCL_NO_TEMPLATES                // •• CW TCL
  2624. c21,32
  2625. a#else // #ifndef TCL_NO_TEMPLATES                // •• CW TCL
  2626. c2,2
  2627. a#define CW_Decl_PtrArrayIterator(T) \
  2628. aclass CPtrArray_ ## T; \
  2629. aclass CPtrArrayIterator_ ## T : public CArrayIterator { \
  2630. apublic: \
  2631. a    CPtrArrayIterator_ ## T(CPtrArray_ ## T *array, CursorPosition start) \
  2632. a        : CArrayIterator(array, start) {} \
  2633. a    Boolean    Next(T *&item) { return CArrayIterator::Next(&item); } \
  2634. a    Boolean    Prev(T *&item) { return CArrayIterator::Prev(&item); } \
  2635. c32,32
  2636. c2,2
  2637. a#endif // #ifndef TCL_NO_TEMPLATES                // •• CW TCL
  2638. e
  2639. fCPtrArray_CChore.cpp
  2640. i
  2641. fCPtrArray_CDirector.cpp
  2642. i
  2643. fCPtrArray_CView.cpp
  2644. i
  2645. fCStream.tem
  2646. i
  2647. fCStream_CBitMap.cpp
  2648. i
  2649. fCStream_CCollaborator.cpp
  2650. i
  2651. fCStream_CEnvironment.cpp
  2652. i
  2653. fCStream_CEnvirons.cpp
  2654. i
  2655. fCStream_CPaneBorder.cpp
  2656. i
  2657. fPutObject1.cpp
  2658. i
  2659. fPutObject1.tem
  2660. i
  2661. z329,CList.CView.cp
  2662. //
  2663. // TCL 2.0 CodeWarrior port
  2664. //
  2665. //    Instantiation of template class
  2666. //
  2667. //    This file creates a single template class instantiated within
  2668. //    the TCL class.
  2669. //
  2670. //    Eric Scouten, 29 April 1994
  2671. //
  2672.  
  2673.  
  2674. #include "CList.h"
  2675. #include "CView.h"
  2676.  
  2677.  
  2678. //CW_Decl_List(CView)                    // declared in <CView.h>
  2679. CW_Inst_PtrArray(CView)
  2680. CW_Inst_List(CView)
  2681. z344,CList.CWindow.cp
  2682. //
  2683. // TCL 2.0 CodeWarrior port
  2684. //
  2685. //    Instantiation of template class
  2686. //
  2687. //    This file creates a single template class instantiated within
  2688. //    the TCL class.
  2689. //
  2690. //    Eric Scouten, 29 April 1994
  2691. //
  2692.  
  2693.  
  2694. #include "CList.h"
  2695. #include "CWindow.h"
  2696.  
  2697. #ifdef TCL_NO_PRECOMPILED_CLASS
  2698. CW_Decl_List(CWindow)
  2699. #endif
  2700. CW_Inst_PtrArray(CWindow)
  2701. CW_Inst_List(CWindow)
  2702. z322,CPtrArray.CChore.cp
  2703. //
  2704. // TCL 2.0 CodeWarrior port
  2705. //
  2706. //    Instantiation of template class
  2707. //
  2708. //    This file creates a single template class instantiated within
  2709. //    the TCL class.
  2710. //
  2711. //    Eric Scouten, 29 April 1994
  2712. //
  2713.  
  2714.  
  2715. #include "CPtrArray.h"
  2716.  
  2717. #ifdef TCL_NO_PRECOMPILED_CLASS
  2718. class CChore;
  2719. CW_Decl_PtrArray(CChore)
  2720. #endif
  2721. CW_Inst_PtrArray(CChore)
  2722.  
  2723. z369,CPtrArray.CDirector.cp
  2724. //
  2725. // TCL 2.0 CodeWarrior port
  2726. //
  2727. //    Instantiation of template class
  2728. //
  2729. //    This file creates a single template class instantiated within
  2730. //    the TCL class.
  2731. //
  2732. //    Eric Scouten, 29 April 1994
  2733. //
  2734.  
  2735.  
  2736. #include "CPtrArray.h"
  2737.  
  2738. #ifdef TCL_NO_PRECOMPILED_CLASS
  2739. class CDirector;
  2740. CW_Decl_PtrArray(CDirector)                    // included by <CDirectorOwner.h>
  2741. #endif
  2742. CW_Inst_PtrArray(CDirector)
  2743.  
  2744. z340,CPtrArray.CGroupButton.cp
  2745. //
  2746. // TCL 2.0 CodeWarrior port
  2747. //
  2748. //    Instantiation of template class
  2749. //
  2750. //    This file creates a single template class instantiated within
  2751. //    the TCL class.
  2752. //
  2753. //    Eric Scouten, 29 April 1994
  2754. //
  2755.  
  2756.  
  2757. #include "CPtrArray.h"
  2758.  
  2759. #ifdef TCL_NO_PRECOMPILED_CLASS
  2760. class CGroupButton;
  2761. CW_Decl_PtrArray(CGroupButton)
  2762. #endif
  2763. CW_Inst_PtrArray(CGroupButton)
  2764.  
  2765. z489,CStream.extras.cp
  2766. //
  2767. // TCL 2.0 CodeWarrior port
  2768. //
  2769. //    Instantiation of stream helper functions
  2770. //
  2771. //    Eric Scouten, 29 April 1994
  2772. //
  2773.  
  2774.  
  2775. #include "CStream.h"
  2776.  
  2777. #include "CBitMap.h"
  2778. #include "CCollaborator.h"
  2779. #include "CEnvirons.h"
  2780. #include "CPaneBorder.h"
  2781. #include "CView.h"
  2782. #include "CWindow.h"
  2783.  
  2784. CW_Decl_StreamCalls(CWindow)
  2785.  
  2786. CW_Inst_StreamCalls(CBitMap)
  2787. CW_Inst_StreamCalls(CCollaborator)
  2788. CW_Inst_StreamCalls(CEnvirons)
  2789. CW_Inst_StreamCalls(CPaneBorder)
  2790. CW_Inst_StreamCalls(CView)
  2791. CW_Inst_StreamCalls(CWindow)o
  2792. rText Classes
  2793. fCAbstractText.cp
  2794. x485019744,419064040
  2795. c0,953
  2796. a        newTask = new CTextEditTask;
  2797. c955,983
  2798. a        newTask = new CTextStyleTask;
  2799. c985,1190
  2800. e
  2801. fCAbstractText.h
  2802. i
  2803. fCEditText.cp
  2804. i
  2805. fCEditText.h
  2806. x93899106,482535194
  2807. c0,10
  2808. a#include "CPanorama.h"                    // •• CW TCL: preempt nested #include limit
  2809. c11,118
  2810. e
  2811. fCStyleTEClipboard.cp
  2812. x391835603,444221993
  2813. c0,87
  2814. a                text = new CStyleText;
  2815. c89,125
  2816. e
  2817. fCStyleTEClipboard.h
  2818. i
  2819. fCStyleTEEditTask.cp
  2820. i
  2821. fCStyleTEEditTask.h
  2822. i
  2823. fCStyleTEStyleTask.cp
  2824. i
  2825. fCStyleTEStyleTask.h
  2826. i
  2827. fCStyleText.cp
  2828. x405102307,145351629
  2829. c0,321
  2830. a        editTask = new CStyleTEEditTask;
  2831. c323,351
  2832. a        newTask = new CStyleTEStyleTask;
  2833. c353,410
  2834. e
  2835. fCStyleText.h
  2836. i
  2837. fCTextEditTask.cp
  2838. i
  2839. fCTextEditTask.h
  2840. i
  2841. fCTextStyleTask.cp
  2842. i
  2843. fCTextStyleTask.h
  2844. i
  2845. o
  2846. rVisual Architect Library
  2847. fCColorTextEnvirons.cp
  2848. i
  2849. fCColorTextEnvirons.h
  2850. i
  2851. fCFloatDirector.cp
  2852. i
  2853. fCFloatDirector.h
  2854. i
  2855. fCGridMDEF.cp
  2856. x307268911,93565451
  2857. c0,14
  2858. a#include "Global.h"                        // •• CW TCL: removed <>
  2859. a#include "CSelector.h"                    // •• CW TCL: removed <>
  2860. a#include "CBartender.h"                    // •• CW TCL: removed <>
  2861. c18,141
  2862. e
  2863. fCGridMDEF.h
  2864. i
  2865. fCIconButton.cp
  2866. x83558629,377762758
  2867. c0,13
  2868. a#include "OSChecks.h"                    // •• CW TCL: removed <>
  2869. a#include "Commands.h"                    // •• CW TCL: removed <>
  2870. a#include "Global.h"                        // •• CW TCL: removed <>
  2871. a//#include <OSChecks.h>                    // •• CW TCL: can you believe they #included it TWICE!
  2872. a#include "CPaneBorder.h"                // •• CW TCL: removed <>
  2873. a#include "CControl.h"                    // •• CW TCL: removed <>
  2874. a#include "CWindow.h"                    // •• CW TCL: removed <>
  2875. c21,491
  2876. e
  2877. fCIconButton.h
  2878. i
  2879. fCLine.cp
  2880. x12769348,263607029
  2881. c0,15
  2882. a#include "OSChecks.h"                    // •• CW TCL: removed <>
  2883. a#include "Commands.h"                    // •• CW TCL: removed <>
  2884. a#include "Global.h"                        // •• CW TCL: removed <>
  2885. a//#include <OSChecks.h>                    // •• CW TCL: can you believe it... twice AGAIN!
  2886. a#include "CPaneBorder.h"                // •• CW TCL: removed <>
  2887. a#include "CControl.h"                    // •• CW TCL: removed <>
  2888. a#include "CWindow.h"                    // •• CW TCL: removed <>
  2889. a#include "TCLUtilities.h"                // •• CW TCL: removed <>
  2890. c24,447
  2891. e
  2892. fCLine.h
  2893. i
  2894. fCPICTGrid.cp
  2895. x533994571,439768763
  2896. c0,15
  2897. a#include "Global.h"                        // •• CW TCL: removed <>
  2898. a#include "TCLUtilities.h"                // •• CW TCL: removed <>
  2899. c18,276
  2900. e
  2901. fCPICTGrid.h
  2902. i
  2903. fCPICTGridDirector.cp
  2904. x104433472,291025652
  2905. c0,16
  2906. a#include "Global.h"                        // •• CW TCL: removed <>
  2907. c18,18
  2908. a#include "CWindow.h"                    // •• CW TCL: removed <>
  2909. c20,138
  2910. e
  2911. fCPICTGridDirector.h
  2912. i
  2913. fCPICTSelector.cp
  2914. i
  2915. fCPICTSelector.h
  2916. i
  2917. fCPictureButton.cp
  2918. x131893993,366625072
  2919. c0,18
  2920. a#include "OSChecks.h"                    // •• CW TCL: removed <>
  2921. c20,21
  2922. a//#include "OSChecks.h"                    // •• CW TCL: once was enough, thank you!
  2923. c23,354
  2924. e
  2925. fCPictureButton.h
  2926. i
  2927. fCPolyButton.cp
  2928. x531289659,196004069
  2929. c0,15
  2930. a#include "OSChecks.h"                    // •• CW TCL: removed <>
  2931. a#include "Commands.h"                    // •• CW TCL: removed <>
  2932. a#include "Global.h"                        // •• CW TCL: removed <>
  2933. a//#include <OSChecks.h>                    // •• CW TCL: had enough OSChecks last time through...
  2934. a#include "CPaneBorder.h"                // •• CW TCL: removed <>
  2935. a#include "CControl.h"                    // •• CW TCL: removed <>
  2936. a#include "CWindow.h"                    // •• CW TCL: removed <>
  2937. a#include "TCLUtilities.h"                // •• CW TCL: removed <>
  2938. c24,196
  2939. e
  2940. fCPolyButton.h
  2941. i
  2942. fCRectOvalButton.cp
  2943. x389148034,415534158
  2944. c0,15
  2945. a#include "OSChecks.h"                    // •• CW TCL: removed <>
  2946. a#include "Commands.h"                    // •• CW TCL: removed <>
  2947. a#include "Global.h"                        // •• CW TCL: removed <>
  2948. a//#include <OSChecks.h>                    // •• CW TCL: been there, done that
  2949. a#include "CPaneBorder.h"                // •• CW TCL: removed <>
  2950. a#include "CControl.h"                    // •• CW TCL: removed <>
  2951. a#include "CWindow.h"                    // •• CW TCL: removed <>
  2952. a#include "TCLUtilities.h"                // •• CW TCL: removed <>
  2953. c24,140
  2954. e
  2955. fCRectOvalButton.h
  2956. i
  2957. fCRoundRectButton.cp
  2958. x125216251,385550985
  2959. c0,15
  2960. a#include "OSChecks.h"                    // •• CW TCL: removed <>
  2961. a#include "Commands.h"                    // •• CW TCL: removed <>
  2962. a#include "Global.h"                        // •• CW TCL: removed <>
  2963. a//#include <OSChecks.h>                    // •• CW TCL: Hmmm. Think this file’s changed in
  2964. a//                                                        the last few nanoseconds? Naahh...
  2965. a#include "CPaneBorder.h"                // •• CW TCL: removed <>
  2966. a#include "CControl.h"                    // •• CW TCL: removed <>
  2967. a#include "CWindow.h"                    // •• CW TCL: removed <>
  2968. a#include "TCLUtilities.h"                // •• CW TCL: removed <>
  2969. c24,175
  2970. e
  2971. fCRoundRectButton.h
  2972. i
  2973. fCSelectorDirector.cp
  2974. i
  2975. fCSelectorDirector.h
  2976. i
  2977. fCShapeButton.cp
  2978. i
  2979. fCShapeButton.h
  2980. i
  2981. fCStaticText.cp
  2982. i
  2983. fCStaticText.h
  2984. i
  2985. fCSubviewDisplayer.cp
  2986. i
  2987. fCSubviewDisplayer.h
  2988. x117726811,26886913
  2989. c0,10
  2990. a#include "CPane.h"                    // •• CW TCL: removed <>
  2991. c12,65
  2992. e
  2993. fCSwissArmyButton.cp
  2994. i
  2995. fCSwissArmyButton.h
  2996. i
  2997. fCTearOffDirector.cp
  2998. x438353575,73101313
  2999. c0,14
  3000. a#include "CFloatDirector.h"                // •• CW TCL
  3001. c15,32
  3002. e
  3003. fCTearOffDirector.h
  3004. i
  3005. fDialogFunctions.cp
  3006. x222087701,448769775
  3007. c0,11
  3008. a#include "TBUtilities.h"                // •• CW TCL: removed <>
  3009. c13,105
  3010. e
  3011. fDialogFunctions.h
  3012. i
  3013. fViewUtilities.cp
  3014. i
  3015. fViewUtilities.h
  3016. i
  3017. o
  3018. z2714,CW TCLHeaders.cp
  3019. //
  3020. // TCL 2.0 CodeWarrior port
  3021. //
  3022. //    Precompiled headers
  3023. //
  3024. //    Use this file to build the precompiled header file, instead
  3025. //    of “TCL #includes.cpp” provided by Symantec.
  3026. //
  3027. //    Eric Scouten, 19 May 1994
  3028. //
  3029.  
  3030.  
  3031. // prevent multiple compilations
  3032.  
  3033. #ifndef CW_TCL_HDR
  3034. #define CW_TCL_HDR
  3035.  
  3036.  
  3037. // use Metrowerks’ standard precompiled header file
  3038.  
  3039. #include <MacHeaders.c>
  3040.  
  3041. #undef TRUE                        // redefined in <THINK.h>
  3042. #undef FALSE
  3043.  
  3044. #pragma cplusplus on            // wonder why this is necessary?
  3045.  
  3046.  
  3047. //________________________________________________________________________
  3048. //
  3049. // several new conditional compilation macros for the CodeWarrior port
  3050. //
  3051.  
  3052. #define TCL_CW_VERSION 3
  3053.     // Set this macro to the current release number of CodeWarrior
  3054.     // (currently DR/3). As features are added to CodeWarrior, this
  3055.     // macro will be used to maintain compatibility with older
  3056.     // versions. NOTE: There is no support for compilation under DR/1.
  3057.  
  3058. #define TCL_NO_TEMPLATES
  3059.     // This macro triggers the macro substitutions for the TCL templated
  3060.     // classes (CPtrArray<>, CList<>, helper methods for CStream). This
  3061.     // macro must remain defined until CodeWarrior supports templates.
  3062.  
  3063. #if TCL_CW_VERSION<3
  3064. #define TCL_NO_PRECOMPILED_CLASS
  3065. #endif
  3066.     // Needed for compilation under DR/2 since class definitions aren’t
  3067.     // permitted in precompiled headers (can be commented out in DR/3).
  3068.  
  3069. #if TCL_CW_VERSION>2
  3070. #define TCL_NO_MULTIPLE_STATIC_INHERITANCE
  3071. #endif
  3072.     // Workaround for a new bug (feature-?) in DR/3. A static member field
  3073.     // with the same name cannot be multiply inherited. (However, a static member
  3074.     // function can be. :) )
  3075.  
  3076. #define TCL_NO_DEBUGGER_CALLS
  3077.     // Because all the Debugger() calls aren’t trapped by CW’s source-level
  3078.     // debugger. It’s just plain annoying to drop into MacsBug all the
  3079.     // time (especially in PPC code)!
  3080.     
  3081. #define TCL_NO_PATCHES
  3082.     // Because LoadSeg_Patch doesn’t seem to work under CW. Applies only
  3083.     // to 68K builds.
  3084.  
  3085. #define TCL_NO_PRECOMPILED_WATCHDESC
  3086.     // Some strange errors occur when precompiling this header.
  3087.  
  3088. #if TCL_CW_VERSION>2
  3089. #define TCL_USE_PP_EXCEPTIONS
  3090. #endif
  3091.     // Optional switch to use the PowerPlant exception library instead of Bedrock
  3092.     // Exception Library. Requires UException and UDebugging from PowerPlant DR/3.
  3093.     // (Added in 1.1 port.)
  3094.  
  3095.  
  3096. //________________________________________________________________________
  3097. //
  3098. // include the TCL standard headers
  3099. //
  3100.  
  3101. #include "TCL #includes.cpp"
  3102.  
  3103. #ifndef TCL_NO_PRECOMPILED_CLASS
  3104. #include "CSizeBox.h"                    // •• CW TCL temporary
  3105. #endif
  3106.  
  3107.  
  3108. // (dis)allow object I/O (you may comment this out when you pre-compile)
  3109.  
  3110. #define TCL_OBJECT_IO
  3111.  
  3112.  
  3113. // make sure to prevent attempts at including precompiled headers again
  3114.  
  3115. #undef TCL_PCH
  3116.  
  3117.  
  3118. #endif  // #ifndef CW_TCL_HDR
  3119. o
  3120.